Compute Library
 22.08
CpuConvertFullyConnectedWeights Class Reference

Basic function to run kernels::CpuConvertFullyConnectedWeightsKernel. More...

#include <CpuConvertFullyConnectedWeights.h>

Collaboration diagram for CpuConvertFullyConnectedWeights:
[legend]

Public Member Functions

void configure (const ITensorInfo *src, ITensorInfo *dst, const TensorShape &original_src_shape, DataLayout data_layout)
 Configure operator for a given list of arguments. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from INEOperator
 INEOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INEOperator (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INEOperator (INEOperator &&)=default
 Default move constructor. More...
 
INEOperatoroperator= (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INEOperatoroperator= (INEOperator &&)=default
 Default move assignment operator. More...
 
 ~INEOperator ()
 Default destructor. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *src, const ITensorInfo *dst, const TensorShape &original_src_shape, DataLayout data_layout)
 Static function to check if given info will lead to a valid configuration. More...
 

Detailed Description

Basic function to run kernels::CpuConvertFullyConnectedWeightsKernel.

Definition at line 34 of file CpuConvertFullyConnectedWeights.h.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo src,
ITensorInfo dst,
const TensorShape original_src_shape,
DataLayout  data_layout 
)

Configure operator for a given list of arguments.

Parameters
[in]srcSource tensor to permute. Data types supported: All
[out]dstDestintation tensor. Data types supported: Same as src
[in]original_src_shapeShape of the original src tensor (the one entering fully connected layer).
[in]data_layoutThe data layout the weights have been trained in.

Definition at line 34 of file CpuConvertFullyConnectedWeights.cpp.

References ARM_COMPUTE_LOG_PARAMS, and arm_compute::test::validation::k.

35 {
36  ARM_COMPUTE_LOG_PARAMS(src, dst, original_src_shape, data_layout);
37  auto k = std::make_unique<kernels::CpuConvertFullyConnectedWeightsKernel>();
38  k->configure(src, dst, original_src_shape, data_layout);
39  _kernel = std::move(k);
40 }
SimpleTensor< float > src
Definition: DFT.cpp:155
#define ARM_COMPUTE_LOG_PARAMS(...)

◆ run()

void run ( ITensorPack tensors)
overridevirtual

Run the kernels contained in the function.

Parameters
[in]tensorsVector that contains the tensors to operate on.

Reimplemented from INEOperator.

Definition at line 47 of file CpuConvertFullyConnectedWeights.cpp.

References Window::DimZ, Scheduler::get(), and IScheduler::schedule_op().

48 {
49  NEScheduler::get().schedule_op(_kernel.get(), Window::DimZ, _kernel->window(), tensors);
50 }
virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors)=0
Runs the kernel in the same thread as the caller synchronously.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Definition: Window.h:47
static IScheduler & get()
Access the scheduler singleton.
Definition: Scheduler.cpp:94

◆ validate()

Status validate ( const ITensorInfo src,
const ITensorInfo dst,
const TensorShape original_src_shape,
DataLayout  data_layout 
)
static

Static function to check if given info will lead to a valid configuration.

Similar to CpuConvertFullyConnectedWeights::configure()

Returns
a status

Definition at line 42 of file CpuConvertFullyConnectedWeights.cpp.

References CpuConvertFullyConnectedWeightsKernel::validate().

Referenced by NEConvertFullyConnectedWeights::validate(), and CpuFullyConnected::validate().

43 {
45 }
SimpleTensor< float > src
Definition: DFT.cpp:155
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const TensorShape &original_input_shape, DataLayout data_layout)
Static function to check if given info will lead to a valid configuration.

The documentation for this class was generated from the following files: