21.02
|
Common interface for all the GLES kernels. More...
#include <IGCKernel.h>
Public Member Functions | |
IGCKernel () | |
Constructor. More... | |
GCKernel & | kernel () |
Returns a reference to the GLES kernel of this object. More... | |
void | add_1D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
void | add_2D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
void | add_3D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
unsigned int | num_arguments_per_1D_tensor () const |
Returns the number of arguments enqueued per 1D tensor object. More... | |
unsigned int | num_arguments_per_2D_tensor () const |
Returns the number of arguments enqueued per 2D tensor object. More... | |
unsigned int | num_arguments_per_3D_tensor () const |
Returns the number of arguments enqueued per 3D tensor object. More... | |
virtual void | run (const Window &window)=0 |
Enqueue the OpenGL ES shader to process the given window. More... | |
void | set_lws_hint (gles::NDRange &lws_hint) |
Set the Local-Workgroup-Size hint. More... | |
void | set_target (GPUTarget target) |
Set the targeted GPU architecture. More... | |
GPUTarget | get_target () const |
Get the targeted GPU architecture. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Common interface for all the GLES kernels.
Definition at line 39 of file IGCKernel.h.
IGCKernel | ( | ) |
Constructor.
Definition at line 64 of file IGCKernel.cpp.
References arm_compute::MIDGARD, and arm_compute::utils::cast::U.
void add_1D_tensor_argument | ( | unsigned int & | idx, |
const IGCTensor * | tensor, | ||
const unsigned int | binding_point, | ||
const Window & | window | ||
) |
Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx.
[in] | idx | Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0. |
[in] | tensor | Tensor to set as an argument of the object's kernel. |
[in] | binding_point | Tensor's binding point in this kernel. |
[in] | window | Window the kernel will be executed on. |
Definition at line 122 of file IGCKernel.cpp.
References IKernel::window().
Referenced by GCGEMMMatrixAccumulateBiasesKernel::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCNormalizePlanarYUVLayerKernel::run(), GCWeightsReshapeKernel::run(), GCIm2ColKernel::run(), and GCBatchNormalizationLayerKernel::run().
void add_2D_tensor_argument | ( | unsigned int & | idx, |
const IGCTensor * | tensor, | ||
const unsigned int | binding_point, | ||
const Window & | window | ||
) |
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx.
[in] | idx | Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0. |
[in] | tensor | Tensor to set as an argument of the object's kernel. |
[in] | binding_point | Tensor's binding point in this kernel. |
[in] | window | Window the kernel will be executed on. |
Definition at line 127 of file IGCKernel.cpp.
References IKernel::window().
Referenced by IGCSimple2DKernel::run(), GCTransposeKernel::run(), GCGEMMMatrixAccumulateBiasesKernel::run(), GCGEMMMatrixAdditionKernel::run(), GCAbsoluteDifferenceKernel::run(), GCGEMMTranspose1xWKernel::run(), GCGEMMInterleave4x4Kernel::run(), GCWeightsReshapeKernel::run(), GCCol2ImKernel::run(), GCGEMMMatrixMultiplyKernel::run(), and GCIm2ColKernel::run().
void add_3D_tensor_argument | ( | unsigned int & | idx, |
const IGCTensor * | tensor, | ||
const unsigned int | binding_point, | ||
const Window & | window | ||
) |
Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx.
[in] | idx | Index at which to start adding the tensor's arguments.Input and output tensor will have sperated index, multiple indices start from 1, single index have to be set to 0. |
[in] | tensor | Tensor to set as an argument of the object's kernel. |
[in] | binding_point | Tensor's binding point in this kernel. |
[in] | window | Window the kernel will be executed on. |
Definition at line 132 of file IGCKernel.cpp.
References IKernel::window().
Referenced by IGCSimple3DKernel::run(), GCScaleKernel::run(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCPixelWiseMultiplicationKernel::run(), GCNormalizationLayerKernel::run(), GCActivationLayerKernel::run(), GCDepthConcatenateLayerKernel::run(), GCDropoutLayerKernel::run(), GCLogits1DShiftExpSumKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCFillBorderKernel::run(), GCPoolingLayerKernel::run(), GCArithmeticAdditionKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), GCTensorShiftKernel::run(), GCWeightsReshapeKernel::run(), GCCol2ImKernel::run(), GCIm2ColKernel::run(), GCBatchNormalizationLayerKernel::run(), and GCLogits1DNormKernel::run().
|
inline |
Get the targeted GPU architecture.
Definition at line 122 of file IGCKernel.h.
References arm_compute::enqueue(), IGCKernel::kernel(), arm_compute::U, and IKernel::window().
Referenced by GCGEMMMatrixMultiplyKernel::configure().
GCKernel & kernel | ( | ) |
Returns a reference to the GLES kernel of this object.
Definition at line 69 of file IGCKernel.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG_VAR, ARM_COMPUTE_GL_CHECK, ARM_COMPUTE_UNUSED, arm_compute::ceil_to_multiple(), IGCTensor::gc_buffer(), glBindBufferBase(), ITensor::info(), arm_compute::test::validation::info, ITensorInfo::num_dimensions(), ITensorInfo::offset_first_element_in_bytes(), GCKernel::set_argument(), arm_compute::cpu::step, ITensorInfo::strides_in_bytes(), and IKernel::window().
Referenced by arm_compute::enqueue(), and IGCKernel::get_target().
unsigned int num_arguments_per_1D_tensor | ( | ) | const |
Returns the number of arguments enqueued per 1D tensor object.
Definition at line 137 of file IGCKernel.cpp.
Referenced by GCDirectConvolutionLayerKernel< kernel_size >::configure(), and GCWeightsReshapeKernel::configure().
unsigned int num_arguments_per_2D_tensor | ( | ) | const |
Returns the number of arguments enqueued per 2D tensor object.
Definition at line 142 of file IGCKernel.cpp.
Referenced by GCWeightsReshapeKernel::configure().
unsigned int num_arguments_per_3D_tensor | ( | ) | const |
Returns the number of arguments enqueued per 3D tensor object.
Definition at line 147 of file IGCKernel.cpp.
Referenced by GCLogits1DMaxKernel::configure(), GCScaleKernel::configure(), GCFillBorderKernel::configure(), GCDirectConvolutionLayerKernel< kernel_size >::configure(), GCLogits1DShiftExpSumKernel::configure(), GCWeightsReshapeKernel::configure(), GCDepthwiseConvolutionLayer3x3Kernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCNormalizePlanarYUVLayerKernel::run(), GCCol2ImKernel::run(), and GCBatchNormalizationLayerKernel::run().
|
pure virtual |
Enqueue the OpenGL ES shader to process the given window.
[in] | window | Region on which to execute the kernel. (Must be a valid region of the window returned by window()). |
Implemented in GCLogits1DNormKernel, GCBatchNormalizationLayerKernel, GCGEMMMatrixMultiplyKernel, GCIm2ColKernel, GCCol2ImKernel, GCWeightsReshapeKernel, GCTensorShiftKernel, GCNormalizePlanarYUVLayerKernel, GCArithmeticAdditionKernel, GCGEMMInterleave4x4Kernel, GCPoolingLayerKernel, GCDirectConvolutionLayerKernel< kernel_size >, GCFillBorderKernel, GCDropoutLayerKernel, GCLogits1DShiftExpSumKernel, GCActivationLayerKernel, GCDepthConcatenateLayerKernel, GCGEMMTranspose1xWKernel, GCAbsoluteDifferenceKernel, GCGEMMMatrixAdditionKernel, GCNormalizationLayerKernel, GCDepthwiseConvolutionLayer3x3Kernel, GCPixelWiseMultiplicationKernel, GCGEMMMatrixAccumulateBiasesKernel, GCTransposeKernel, GCScaleKernel, IGCSimple3DKernel, and IGCSimple2DKernel.
Referenced by GCScheduler::dispatch().
|
inline |
Set the Local-Workgroup-Size hint.
[in] | lws_hint | Local-Workgroup-Size to use |
Definition at line 104 of file IGCKernel.h.
|
inline |
Set the targeted GPU architecture.
[in] | target | The targeted GPU architecture |
Definition at line 113 of file IGCKernel.h.
Referenced by GCGEMM::configure(), and GCConvolutionLayer::configure().