Compute Library
 23.11
ClPool3dKernel Class Reference

Interface for the pooling layer kernel. More...

#include <ClPool3dKernel.h>

Collaboration diagram for ClPool3dKernel:
[legend]

Public Member Functions

 ClPool3dKernel ()
 
 ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE (ClPool3dKernel)
 
void configure (const ClCompileContext &compile_context, const ITensorInfo *src, ITensorInfo *dst, const Pooling3dLayerInfo &pool_info)
 Configure kernel for a given list of arguments. More...
 
void run_op (ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) override
 Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue. More...
 
- Public Member Functions inherited from ICLKernel
 ICLKernel ()
 Constructor. More...
 
cl::Kernel & kernel ()
 Returns a reference to the OpenCL kernel of this object. More...
 
CLKernelType type () const
 Returns the CL kernel type. More...
 
template<typename T >
void add_1D_array_argument (unsigned int &idx, const ICLArray< T > *array, const Strides &strides, unsigned int num_dimensions, const Window &window)
 Add the passed 1D array's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_1D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, 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_1D_tensor_argument_if (bool cond, unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx if the condition is true. More...
 
void add_2D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, 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_2D_tensor_argument_if (bool cond, unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx if the condition is true. More...
 
void add_3D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_4D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 4D tensor's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_5D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 5D tensor's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_3d_tensor_nhw_argument (unsigned int &idx, const ICLTensor *tensor)
 Add the passed NHW 3D tensor's parameters to the object's kernel's arguments by passing strides, dimensions and the offset to the first valid element in bytes. More...
 
void add_4d_tensor_nhwc_argument (unsigned int &idx, const ICLTensor *tensor)
 Add the passed NHWC 4D tensor's parameters to the object's kernel's arguments by passing strides, dimensions and the offset to the first valid element in bytes. More...
 
virtual void run (const Window &window, cl::CommandQueue &queue)
 Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue. More...
 
template<typename T >
void add_argument (unsigned int &idx, T value)
 Add the passed parameters to the object's kernel's arguments starting from the index idx. More...
 
void set_lws_hint (const cl::NDRange &lws_hint)
 Set the Local-Workgroup-Size hint. More...
 
cl::NDRange lws_hint () const
 Return the Local-Workgroup-Size hint. More...
 
void set_wbsm_hint (const cl_int &wbsm_hint)
 Set the workgroup batch size modifier hint. More...
 
cl_int wbsm_hint () const
 Return the workgroup batch size modifier hint. More...
 
const std::string & config_id () const
 Get the configuration ID. More...
 
void set_target (GPUTarget target)
 Set the targeted GPU architecture. More...
 
void set_target (cl::Device &device)
 Set the targeted GPU architecture according to the CL device. More...
 
GPUTarget get_target () const
 Get the targeted GPU architecture. More...
 
size_t get_max_workgroup_size ()
 Get the maximum workgroup size for the device the CLKernelLibrary uses. More...
 
cl::NDRange get_cached_gws () const
 Get the cached gws used to enqueue this kernel. More...
 
void cache_gws (const cl::NDRange &gws)
 Cache the latest gws used to enqueue this kernel. More...
 
template<unsigned int dimension_size>
void add_tensor_argument (unsigned &idx, const ICLTensor *tensor, const Window &window)
 
template<typename T , unsigned int dimension_size>
void add_array_argument (unsigned &idx, const ICLArray< T > *array, const Strides &strides, unsigned int num_dimensions, const Window &window)
 Add the passed array's parameters to the object's kernel's arguments starting from the index idx. 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 Windowwindow () const
 The maximum window the kernel can be executed on. More...
 
bool is_window_configured () const
 Function to check if the embedded window of this kernel has been configured. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *src, const ITensorInfo *dst, const Pooling3dLayerInfo &pool_info)
 Static function to check if given info will lead to a valid configuration. More...
 
- Static Public Member Functions inherited from ICLKernel
constexpr static unsigned int num_arguments_per_3d_tensor_nhw ()
 Returns the number of arguments enqueued per NHW 3D Tensor object. More...
 
constexpr static unsigned int num_arguments_per_4d_tensor_nhwc ()
 Returns the number of arguments enqueued per NHWC 4D Tensor object. More...
 
constexpr static unsigned int num_arguments_per_1D_array ()
 Returns the number of arguments enqueued per 1D array object. More...
 
constexpr static unsigned int num_arguments_per_1D_tensor ()
 Returns the number of arguments enqueued per 1D tensor object. More...
 
constexpr static unsigned int num_arguments_per_2D_tensor ()
 Returns the number of arguments enqueued per 2D tensor object. More...
 
constexpr static unsigned int num_arguments_per_3D_tensor ()
 Returns the number of arguments enqueued per 3D tensor object. More...
 
constexpr static unsigned int num_arguments_per_4D_tensor ()
 Returns the number of arguments enqueued per 4D tensor object. More...
 
static cl::NDRange gws_from_window (const Window &window, bool use_dummy_work_items)
 Get the global work size given an execution window. More...
 

Detailed Description

Interface for the pooling layer kernel.

Definition at line 38 of file ClPool3dKernel.h.

Constructor & Destructor Documentation

◆ ClPool3dKernel()

Definition at line 101 of file ClPool3dKernel.cpp.

102 {
103  _type = CLKernelType::POOL;
104 }

References arm_compute::POOL.

Member Function Documentation

◆ ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE()

ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE ( ClPool3dKernel  )

◆ configure()

void configure ( const ClCompileContext compile_context,
const ITensorInfo src,
ITensorInfo dst,
const Pooling3dLayerInfo pool_info 
)

Configure kernel for a given list of arguments.

Note
Asymmetric padding is not supported when dimension rounding type == CEIL.
Parameters
[in]compile_contextThe compile context to be used.
[in]srcSource tensor info. Data types supported: F16/F32/QASYMM8/QASYMM8_SIGNED
[out]dstDestination tensor info. Data types supported: same as src.
[in]pool_infoContains pooling operation information described in Pooling3dLayerInfo.

Definition at line 106 of file ClPool3dKernel.cpp.

110 {
113  auto padding_info = get_padding_info({src, dst});
114 
115  // Auto init if empty
116  TensorShape out_shape = compute_pool3d_shape(src->tensor_shape(), pool_info);
117  auto_init_if_empty(*dst, src->clone()->set_tensor_shape(out_shape));
118 
119  // Set instance variables
120  _pool_info = pool_info;
121  _data_layout = src->data_layout();
122 
123  _num_elems_processed_per_iteration = (dst->data_type() == DataType::F32) ? 2 : 4;
124  _num_elems_processed_per_iteration = adjust_vec_size(_num_elems_processed_per_iteration, dst->dimension(0));
125 
126  const PoolingType pool_type = pool_info.pool_type;
129  const int idx_depth = get_data_layout_dimension_index(_data_layout, DataLayoutDimension::DEPTH);
130  const int idx_channel = get_data_layout_dimension_index(_data_layout, DataLayoutDimension::CHANNEL);
131  const int idx_batch_size = get_data_layout_dimension_index(_data_layout, DataLayoutDimension::BATCHES);
132  const int pool_size_x = pool_info.is_global_pooling ? src->dimension(idx_width) : pool_info.pool_size.width;
133  const int pool_size_y = pool_info.is_global_pooling ? src->dimension(idx_height) : pool_info.pool_size.height;
134  const int pool_size_z = pool_info.is_global_pooling ? src->dimension(idx_depth) : pool_info.pool_size.depth;
135  const bool exclude_padding = pool_info.exclude_padding;
136  const int pool_stride_x = pool_info.stride.x();
137  const int pool_stride_y = pool_info.stride.y();
138  const int pool_stride_z = pool_info.stride.z();
139  const int pool_pad_top = pool_info.padding.top;
140  const int pool_pad_left = pool_info.padding.left;
141  const int pool_pad_front = pool_info.padding.front;
142  const DataType data_type = src->data_type();
143 
144  // Set build options
145  CLBuildOptions build_opts;
146  build_opts.add_option("-DVEC_SIZE=" + support::cpp11::to_string(_num_elems_processed_per_iteration));
147  build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(data_type));
148  build_opts.add_option("-DPOOL_" + string_from_pooling_type(pool_type));
149  build_opts.add_option("-DSTRIDE_X=" + support::cpp11::to_string(pool_stride_x));
150  build_opts.add_option("-DSTRIDE_Y=" + support::cpp11::to_string(pool_stride_y));
151  build_opts.add_option("-DSTRIDE_Z=" + support::cpp11::to_string(pool_stride_z));
152  build_opts.add_option("-DPAD_X=" + support::cpp11::to_string(pool_pad_left));
153  build_opts.add_option("-DPAD_Y=" + support::cpp11::to_string(pool_pad_top));
154  build_opts.add_option("-DPAD_Z=" + support::cpp11::to_string(pool_pad_front));
155  build_opts.add_option("-DPOOL_SIZE_X=" + support::cpp11::to_string(pool_size_x));
156  build_opts.add_option("-DPOOL_SIZE_Y=" + support::cpp11::to_string(pool_size_y));
157  build_opts.add_option("-DPOOL_SIZE_Z=" + support::cpp11::to_string(pool_size_z));
158  build_opts.add_option("-DSRC_WIDTH=" + support::cpp11::to_string(src->dimension(idx_width)));
159  build_opts.add_option("-DSRC_HEIGHT=" + support::cpp11::to_string(src->dimension(idx_height)));
160  build_opts.add_option("-DSRC_DEPTH=" + support::cpp11::to_string(src->dimension(idx_depth)));
161 
162  // If datatype is quantized add relevant parameters
163  if (is_data_type_quantized_asymmetric(data_type) && src->quantization_info() != dst->quantization_info())
164  {
165  const UniformQuantizationInfo iq_info = src->quantization_info().uniform();
166  const UniformQuantizationInfo oq_info = dst->quantization_info().uniform();
167 
168  build_opts.add_option("-DOFFSET_IN1=" + float_to_string_with_full_precision(iq_info.offset));
169  build_opts.add_option("-DOFFSET_OUT=" + float_to_string_with_full_precision(oq_info.offset));
170  build_opts.add_option("-DSCALE_IN1=" + float_to_string_with_full_precision(iq_info.scale));
171  build_opts.add_option("-DSCALE_OUT=" + float_to_string_with_full_precision(oq_info.scale));
172  }
173 
174  // Set the initial value for the pooling operation accordingly with the data type
175  if (pool_type == PoolingType::MAX)
176  {
178  {
179  PixelValue type_min{};
180  std::tie(type_min, std::ignore) = get_min_max(data_type);
181  build_opts.add_option("-DINITIAL_VALUE=" + support::cpp11::to_string(type_min.get<int32_t>()));
182  }
183  else
184  {
185  build_opts.add_option("-DINITIAL_VALUE=" +
187  }
188  }
189  else
190  {
191  // Pool AVG and Pool L2 initial value
192  build_opts.add_option("-DINITIAL_VALUE=0");
193  }
194  // Create kernel
195  // Floating point mixed precision is support on F16 only
196  const auto use_fp_mixed_precision =
197  (data_type == DataType::F16) && pool_info.fp_mixed_precision && pool_type != PoolingType::MAX;
198 
199  // Wider accumulation is required to avoid accuracy loss
200  // Case 1: Floating point mixed precision (fp16 src data and fp32 accumulation)
201  DataType acc_data_type = data_type;
202  if (use_fp_mixed_precision)
203  {
204  acc_data_type = DataType::F32;
205  }
206  else if (is_data_type_quantized(data_type) &&
207  pool_type != PoolingType::MAX) // Use S32 for avg pooling to allow for integer division
208  {
209  acc_data_type = DataType::S32;
210  }
211 
212  build_opts.add_option("-DACC_DATA_TYPE=" + get_cl_type_from_data_type(acc_data_type));
213  build_opts.add_option_if(use_fp_mixed_precision, "-DFP_MIXED_PRECISION");
214  build_opts.add_option_if(exclude_padding, "-DEXCLUDE_PADDING");
215  build_opts.add_option("-DDST_HEIGHT=" + support::cpp11::to_string(dst->dimension(idx_height)));
216  build_opts.add_option("-DDST_DEPTH=" + support::cpp11::to_string(dst->dimension(idx_depth)));
217  build_opts.add_option("-DDST_CHANNELS=" + support::cpp11::to_string(dst->dimension(idx_channel)));
218  build_opts.add_option("-DDST_BATCH_SIZE=" + support::cpp11::to_string(dst->dimension(idx_batch_size)));
219  build_opts.add_option("-DVEC_SIZE_LEFTOVER=" +
220  support::cpp11::to_string(src->dimension(0) % _num_elems_processed_per_iteration));
221 
222  // if datatype is quantized use quantized kernel function
223  std::string kernel_name = (is_data_type_quantized_asymmetric(data_type) ? "pooling_3d_layer_MxN_ndhwc_quantized"
224  : "pooling_3d_layer_MxN_ndhwc");
225  _kernel = create_kernel(compile_context, kernel_name, build_opts.options());
226 
227  // Configure kernel window
228  Window win = calculate_max_window(*dst, Steps(_num_elems_processed_per_iteration));
229  ICLKernel::configure_internal(win);
230 
231  // Set config_id for enabling LWS tuning
232  _config_id = "pooling_layer_3d";
234  _config_id += "_";
235  _config_id += lower_string(string_from_data_layout(_data_layout));
236  _config_id += "_";
237  _config_id += support::cpp11::to_string(dst->dimension(idx_width));
238  _config_id += "_";
239  _config_id += support::cpp11::to_string(dst->dimension(idx_height));
240  _config_id += "_";
241  _config_id += support::cpp11::to_string(dst->dimension(idx_channel));
242  _config_id += "_";
243  _config_id += lower_string(string_from_data_layout(src->data_layout()));
244 
246 }

References CLBuildOptions::add_option(), CLBuildOptions::add_option_if(), arm_compute::adjust_vec_size(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::BATCHES, arm_compute::calculate_max_window(), arm_compute::CHANNEL, arm_compute::misc::shape_calculator::compute_pool3d_shape(), arm_compute::create_kernel(), arm_compute::test::validation::data_type, Size3D::depth, arm_compute::DEPTH, arm_compute::test::validation::dst, Pooling3dLayerInfo::exclude_padding, arm_compute::F16, arm_compute::F32, arm_compute::float_to_string_with_full_precision(), Pooling3dLayerInfo::fp_mixed_precision, Padding3D::front, arm_compute::get_cl_type_from_data_type(), arm_compute::get_data_layout_dimension_index(), arm_compute::get_min_max(), arm_compute::get_padding_info(), arm_compute::has_padding_changed(), Size3D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::is_data_type_quantized(), arm_compute::is_data_type_quantized_asymmetric(), Pooling3dLayerInfo::is_global_pooling, kernel_name, Padding3D::left, arm_compute::lower_string(), arm_compute::support::cpp11::lowest(), arm_compute::MAX, UniformQuantizationInfo::offset, CLBuildOptions::options(), Pooling3dLayerInfo::padding, Pooling3dLayerInfo::pool_size, Pooling3dLayerInfo::pool_type, arm_compute::S32, UniformQuantizationInfo::scale, arm_compute::test::validation::src, Pooling3dLayerInfo::stride, arm_compute::string_from_data_layout(), arm_compute::string_from_data_type(), arm_compute::string_from_pooling_type(), arm_compute::support::cpp11::to_string(), Padding3D::top, arm_compute::cpu::kernels::validate_arguments(), Size3D::width, arm_compute::WIDTH, Size3D::x(), Size3D::y(), and Size3D::z().

◆ run_op()

void run_op ( ITensorPack tensors,
const Window window,
cl::CommandQueue &  queue 
)
overridevirtual

Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue.

Note
The queue is not flushed by this method, and therefore the kernel will not have been executed by the time this method returns.
Parameters
[in]tensorsA vector containing the tensors to operato on.
[in]windowRegion on which to execute the kernel. (Must be a valid region of the window returned by window()).
[in,out]queueCommand queue on which to enqueue the kernel.

Reimplemented from ICLKernel.

Definition at line 254 of file ClPool3dKernel.cpp.

255 {
258 
259  const auto src =
260  utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC));
261  auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST_0));
262 
263  // Collapse 3D window
264  Window window_collapsed = window.collapse_if_possible(ICLKernel::window(), Window::DimZ);
265 
266  // Set CL kernel arguments
267  unsigned int idx = 0;
268  // Passing of the window not needed, as the steps are not used for the pool3d kernel
271  enqueue(queue, *this, window_collapsed, lws_hint());
272 }

References arm_compute::ACL_DST_0, arm_compute::ACL_SRC, ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, Window::collapse_if_possible(), Window::DimZ, arm_compute::test::validation::dst, arm_compute::enqueue(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), arm_compute::test::validation::src, and IKernel::window().

◆ validate()

Status validate ( const ITensorInfo src,
const ITensorInfo dst,
const Pooling3dLayerInfo pool_info 
)
static

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

Similar to ClPool3dKernel::configure()

Returns
a status

Definition at line 248 of file ClPool3dKernel.cpp.

249 {
251  return Status{};
252 }

References ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::dst, arm_compute::test::validation::src, and arm_compute::cpu::kernels::validate_arguments().

Referenced by ClPool3d::validate().


The documentation for this class was generated from the following files:
arm_compute::misc::shape_calculator::compute_pool3d_shape
TensorShape compute_pool3d_shape(const TensorShape &src, Pooling3dLayerInfo pool3d_info)
Calculate the output pool3d shape of a tensor.
Definition: ShapeCalculator.h:1655
arm_compute::support::cpp11::to_string
std::string to_string(T &&value)
Convert integer and float values to string.
Definition: StringSupport.h:168
arm_compute::test::validation::src
SimpleTensor< float > src
Definition: DFT.cpp:155
arm_compute::string_from_pooling_type
const std::string & string_from_pooling_type(PoolingType type)
Translates a given pooling type to a string.
Definition: Utils.cpp:118
arm_compute::test::validation::idx_height
const int idx_height
Definition: Scale.cpp:263
arm_compute::DataLayoutDimension::CHANNEL
@ CHANNEL
channel
arm_compute::calculate_max_window
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
Definition: WindowHelpers.cpp:29
arm_compute::POOL
@ POOL
Pool CL kernel type.
Definition: CLTypes.h:85
arm_compute::test::validation::dst
auto dst
Definition: DFT.cpp:170
arm_compute::lower_string
std::string lower_string(const std::string &val)
Lower a given string.
Definition: StringUtils.cpp:38
arm_compute::support::cpp11::lowest
T lowest()
Definition: ToolchainSupport.h:279
arm_compute::cpu::kernels::validate_arguments
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
Definition: CpuDirectConv2dKernel.cpp:57
ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
Definition: Validate.h:1079
arm_compute::Window::collapse_if_possible
Window collapse_if_possible(const Window &full_window, size_t first, size_t last, bool *has_collapsed=nullptr) const
Collapse the dimensions between first and last if possible.
Definition: Window.inl:72
arm_compute::string_from_data_type
const std::string & string_from_data_type(DataType dt)
Convert a data type identity into a string.
Definition: DataTypeUtils.cpp:31
arm_compute::test::validation::idx_width
const int idx_width
Definition: Scale.cpp:262
arm_compute::DataLayoutDimension::WIDTH
@ WIDTH
width
ARM_COMPUTE_RETURN_ON_ERROR
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:205
arm_compute::DataLayoutDimension::DEPTH
@ DEPTH
depth
ARM_COMPUTE_ERROR_ON_NULLPTR
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Definition: Validate.h:159
ARM_COMPUTE_ERROR_ON
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
ARM_COMPUTE_ERROR_THROW_ON
#define ARM_COMPUTE_ERROR_THROW_ON(status)
Definition: Error.h:455
arm_compute::ACL_DST_0
@ ACL_DST_0
Definition: Types.h:56
arm_compute::DataLayoutDimension::HEIGHT
@ HEIGHT
height
arm_compute::auto_init_if_empty
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
Definition: AutoConfiguration.h:43
arm_compute::create_kernel
cl::Kernel create_kernel(const CLCompileContext &ctx, const std::string &kernel_name, const std::set< std::string > &build_opts=std::set< std::string >())
Creates an opencl kernel using a compile context.
Definition: CLHelpers.cpp:409
ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
Definition: Validate.h:203
arm_compute::float_to_string_with_full_precision
std::string float_to_string_with_full_precision(float val)
Create a string with the float in full precision.
Definition: StringUtils.cpp:52
arm_compute::PoolingType
PoolingType
Available pooling types.
Definition: Types.h:480
arm_compute::ICLKernel::add_5D_tensor_argument
void add_5D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 5D tensor's parameters to the object's kernel's arguments starting from the index idx.
Definition: ICLKernel.h:254
arm_compute::test::validation::data_type
data_type
Definition: Cast.cpp:222
arm_compute::IKernel::window
const Window & window() const
The maximum window the kernel can be executed on.
Definition: IKernel.cpp:28
arm_compute::string_from_data_layout
const std::string & string_from_data_layout(DataLayout dl)
Convert a data layout identity into a string.
Definition: DataLayoutUtils.cpp:30
arm_compute::get_cl_type_from_data_type
std::string get_cl_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL type.
Definition: CLHelpers.cpp:41
arm_compute::get_data_layout_dimension_index
size_t get_data_layout_dimension_index(const DataLayout &data_layout, const DataLayoutDimension &data_layout_dimension)
Get the index of the given dimension.
Definition: Helpers.inl:201
arm_compute::PoolingType::MAX
@ MAX
Max Pooling.
arm_compute::DataType::F16
@ F16
16-bit floating-point number
arm_compute::adjust_vec_size
unsigned int adjust_vec_size(unsigned int vec_size, size_t dim0)
Returns the adjusted vector size in case it is less than the input's first dimension,...
Definition: AdjustVecSize.h:38
arm_compute::has_padding_changed
bool has_padding_changed(const std::unordered_map< const ITensorInfo *, PaddingSize > &padding_map)
Check if the previously stored padding info has changed after configuring a kernel.
Definition: Utils.cpp:491
arm_compute::Window::DimZ
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Definition: Window.h:47
arm_compute::DataType::S32
@ S32
signed 32-bit number
arm_compute::ICLKernel::lws_hint
cl::NDRange lws_hint() const
Return the Local-Workgroup-Size hint.
Definition: ICLKernel.h:383
arm_compute::is_data_type_quantized_asymmetric
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
Definition: DataTypeUtils.h:346
arm_compute::is_data_type_quantized
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
Definition: DataTypeUtils.h:324
arm_compute::ACL_SRC
@ ACL_SRC
Definition: Types.h:44
arm_compute::DataLayoutDimension::BATCHES
@ BATCHES
batches
arm_compute::DataType::F32
@ F32
32-bit floating-point number
arm_compute::get_min_max
std::tuple< PixelValue, PixelValue > get_min_max(DataType dt)
Compute the mininum and maximum values a data type can take.
Definition: DataTypeUtils.h:195
arm_compute::DataType
DataType
Available data types.
Definition: CoreTypes.h:83
arm_compute::get_padding_info
std::unordered_map< const ITensorInfo *, PaddingSize > get_padding_info(std::initializer_list< const ITensorInfo * > infos)
Stores padding information before configuring a kernel.
Definition: Utils.cpp:476
kernel_name
std::string kernel_name
Definition: ClIm2ColKernel.cpp:58
arm_compute::enqueue
void enqueue(cl::CommandQueue &queue, ICLKernel &kernel, const Window &window, const cl::NDRange &lws_hint=CLKernelLibrary::get().default_ndrange(), bool use_dummy_work_items=false)
Add the kernel to the command queue with the given window.
Definition: ICLKernel.cpp:33