24.02.1
|
Weights tensor transform interface In order to identify the different reshape functions, each reshape function has to generate a unique id. More...
#include <ITransformWeights.h>
Public Member Functions | |
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... | |
ITransformWeights & | operator= (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... | |
ITransformWeights & | operator= (ITransformWeights &&other) |
Allow instances of this class to be moved. More... | |
virtual ITensor * | get_weights ()=0 |
Get a pointer to the transformed weights. More... | |
virtual uint32_t | uid ()=0 |
Function that returns a unique id of the reshape function. More... | |
virtual void | run ()=0 |
Run the transformation function. More... | |
virtual void | release ()=0 |
Release transformed weights memory. 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... | |
Weights tensor transform interface In order to identify the different reshape functions, each reshape function has to generate a unique id.
We use the following conversion using an unsigned 32bit value:
Lower two bits store the target: 00 -> Neon 01 -> CL 11 -> Unused
Five bits store the id of the reshape function: 00000 -> FullyConnectedLayerReshapeWeights 00001 -> ConvertFullyConnectedWeights 00010 -> ConvolutionLayerReshapeWeights 00011 -> DepthwiseConvolutionLayerReshapeWeights 00100 -> GEMMReshapeLHSMatrixKernel 00101 -> GEMMReshapeRHSMatrixKernel
Rest of the bits are used for identifying special cases such as assembly functions and extra arguments in the reshape kernels.
Definition at line 56 of file ITransformWeights.h.
|
default |
Default Constructor.
|
virtualdefault |
Default Destructor.
|
delete |
Prevent instances of this class to be copy constructed.
|
inline |
Allow instances of this class to be move constructed.
Definition at line 68 of file ITransformWeights.h.
|
inline |
Decrease the object's refcount and return the updated value.
Definition at line 107 of file ITransformWeights.h.
|
pure virtual |
Get a pointer to the transformed weights.
Implemented in CLConvertFullyConnectedWeightsManaged, and NEFullyConnectedLayerReshapeWeightsManaged.
Referenced by IWeightsManager::acquire(), and IWeightsManager::run().
|
inline |
Increase the object's refcount.
Definition at line 98 of file ITransformWeights.h.
Referenced by IWeightsManager::acquire().
|
inline |
Function that returns a flag on whether the weights are reshaped or not.
Definition at line 116 of file ITransformWeights.h.
|
delete |
Prevent instances of this class to be copied.
|
inline |
Allow instances of this class to be moved.
Definition at line 73 of file ITransformWeights.h.
|
pure virtual |
Release transformed weights memory.
Implemented in CLConvertFullyConnectedWeightsManaged, and NEFullyConnectedLayerReshapeWeightsManaged.
|
pure virtual |
Run the transformation function.
Implemented in CLConvertFullyConnectedWeightsManaged, and NEFullyConnectedLayerReshapeWeightsManaged.
Referenced by IWeightsManager::run().
|
pure virtual |
Function that returns a unique id of the reshape function.
Implemented in CLConvertFullyConnectedWeightsManaged, and NEFullyConnectedLayerReshapeWeightsManaged.
Referenced by IWeightsManager::acquire(), and IWeightsManager::run().