Compute Library
 20.08
NEConvolutionLayerReshapeWeightsTransform Class Reference

Basic function to manage the reshape weights generated from NEConvolutionLayerReshapeWeights. More...

#include <NEGEMMConvolutionLayer.h>

Collaboration diagram for NEConvolutionLayerReshapeWeightsTransform:
[legend]

Public Member Functions

void configure (const ITensor *input, const ITensor *biases)
 
void run () override
 Run the transformation function. More...
 
ITensorget_weights () override
 Get a pointer to the transformed weights. More...
 
void release () override
 Release transformed weights memory. More...
 
uint32_t uid () override
 Function that returns a unique id of the reshape function. More...
 
bool is_reshape_run ()
 
- Public Member Functions inherited from ITransformWeights
 ITransformWeights ()=default
 Default Constructor. More...
 
virtual ~ITransformWeights ()=default
 Default Destructor. More...
 
 ITransformWeights (const ITransformWeights &)=delete
 Prevent instances of this class to be copy constructed. More...
 
ITransformWeightsoperator= (const ITransformWeights &)=delete
 Prevent instances of this class to be copied. More...
 
 ITransformWeights (ITransformWeights &&other)
 Allow instances of this class to be move constructed. More...
 
ITransformWeightsoperator= (ITransformWeights &&other)
 Allow instances of this class to be moved. More...
 
void increase_refcount ()
 Increase the object's refcount. More...
 
int32_t decrease_refcount ()
 Decrease the object's refcount and return the updated value. More...
 
bool is_reshape_run ()
 Function that returns a flag on whether the weights are reshaped or not. More...
 

Detailed Description

Basic function to manage the reshape weights generated from NEConvolutionLayerReshapeWeights.

Definition at line 97 of file NEGEMMConvolutionLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
const ITensor biases 
)
inline

Definition at line 100 of file NEGEMMConvolutionLayer.h.

101  {
102  _bias_bit = (biases != nullptr) ? 1 : 0;
103  _func.configure(input, biases, &_output);
104  }
void configure(const ITensor *weights, const ITensor *biases, ITensor *output)
Set the input and output tensors.

References NEConvolutionLayerReshapeWeights::configure(), and arm_compute::test::validation::input.

Referenced by NEGEMMConvolutionLayer::configure().

◆ get_weights()

ITensor* get_weights ( )
inlineoverridevirtual

Get a pointer to the transformed weights.

Returns
The pointer to the transformed ITensor weights

Implements ITransformWeights.

Definition at line 113 of file NEGEMMConvolutionLayer.h.

114  {
115  return &_output;
116  }

◆ is_reshape_run()

bool is_reshape_run ( )
inline

Definition at line 128 of file NEGEMMConvolutionLayer.h.

129  {
130  return _reshape_run;
131  }

◆ release()

void release ( )
inlineoverridevirtual

Release transformed weights memory.

Implements ITransformWeights.

Definition at line 118 of file NEGEMMConvolutionLayer.h.

119  {
120  _output.allocator()->free();
121  }
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
Definition: Tensor.cpp:48
void free() override
Free allocated CPU memory.

References Tensor::allocator(), and TensorAllocator::free().

◆ run()

void run ( )
inlineoverridevirtual

Run the transformation function.

Implements ITransformWeights.

Definition at line 106 of file NEGEMMConvolutionLayer.h.

107  {
108  _output.allocator()->allocate();
109  _func.run();
110  _reshape_run = true;
111  }
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
Definition: Tensor.cpp:48
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
void run() override
Run the kernels contained in the function.

References TensorAllocator::allocate(), Tensor::allocator(), and NEConvolutionLayerReshapeWeights::run().

◆ uid()

uint32_t uid ( )
inlineoverridevirtual

Function that returns a unique id of the reshape function.

Returns
The computed unique id

Implements ITransformWeights.

Definition at line 123 of file NEGEMMConvolutionLayer.h.

124  {
125  return ((0x8) | (_bias_bit << 7));
126  }

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