Compute Library
 22.11
ClDirectConv3dKernel Class Reference

Interface for the direct convolution 3d kernel. More...

#include <ClDirectConv3dKernel.h>

Collaboration diagram for ClDirectConv3dKernel:
[legend]

Public Member Functions

 ClDirectConv3dKernel ()
 Construtor. More...
 
 ClDirectConv3dKernel (const ClDirectConv3dKernel &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ClDirectConv3dKerneloperator= (const ClDirectConv3dKernel &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ClDirectConv3dKernel (ClDirectConv3dKernel &&)=default
 Default move constructor. More...
 
ClDirectConv3dKerneloperator= (ClDirectConv3dKernel &&)=default
 Default move assignment operator. More...
 
void configure (const CLCompileContext &compile_context, const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *src2, ITensorInfo *dst, const Conv3dInfo &conv3d_info)
 Set the src, weights, biases and dst tensors info. 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...
 
virtual void run_composite_op (ITensorPack &tensors, const Window &window, cl::CommandQueue &queue, const experimental::dynamic_fusion::ClExecutionDescriptor &exec_desc)
 The execution is carried out through run_op method. But the run_op method needs to be extended to include ClExecutionDescriptor as now LWS GWS tuning will be separated from the IKernel. 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...
 
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 *src0, const ITensorInfo *src1, const ITensorInfo *src2, const ITensorInfo *dst, const Conv3dInfo &conv3d_info)
 Static function to check if given info will lead to a valid configuration. More...
 
- Static Public Member Functions inherited from ICLKernel
static constexpr unsigned int num_arguments_per_3d_tensor_nhw ()
 Returns the number of arguments enqueued per NHW 3D Tensor object. More...
 
static constexpr unsigned int num_arguments_per_4d_tensor_nhwc ()
 Returns the number of arguments enqueued per NHWC 4D Tensor object. More...
 
static constexpr unsigned int num_arguments_per_1D_array ()
 Returns the number of arguments enqueued per 1D array object. More...
 
static constexpr unsigned int num_arguments_per_1D_tensor ()
 Returns the number of arguments enqueued per 1D tensor object. More...
 
static constexpr unsigned int num_arguments_per_2D_tensor ()
 Returns the number of arguments enqueued per 2D tensor object. More...
 
static constexpr unsigned int num_arguments_per_3D_tensor ()
 Returns the number of arguments enqueued per 3D tensor object. More...
 
static constexpr 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)
 Get the global work size given an execution window. More...
 

Detailed Description

Interface for the direct convolution 3d kernel.

Definition at line 39 of file ClDirectConv3dKernel.h.

Constructor & Destructor Documentation

◆ ClDirectConv3dKernel() [1/3]

Construtor.

Definition at line 87 of file ClDirectConv3dKernel.cpp.

References arm_compute::DIRECT.

88 {
89  _type = CLKernelType::DIRECT;
90 }

◆ ClDirectConv3dKernel() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ ClDirectConv3dKernel() [3/3]

Default move constructor.

Member Function Documentation

◆ configure()

void configure ( const CLCompileContext compile_context,
const ITensorInfo src0,
const ITensorInfo src1,
const ITensorInfo src2,
ITensorInfo dst,
const Conv3dInfo conv3d_info 
)

Set the src, weights, biases and dst tensors info.

Valid data layouts:

  • NDHWC

Valid data type configurations:

src0 src1 src2 dst
F16 F16 F16 F16
F32 F32 F32 F32
QASYMM8 QASYMM8 S32 QASYMM8
QASYMM8_SIGNED QASYMM8_SIGNED S32 QASYMM8_SIGNED
Parameters
[in]compile_contextThe compile context to be used.
[in]src0Source tensor. 4 lower dimensions represent a single src [IFM, width, height, depth], while every optional dimension from 5 and above represent a batch of srcs.
[in]src1Weights tensor. Weights are 5D tensor with dimensions [OFM, IFM, kernel_w, kernel_h, kernel_d].
[in]src2Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM].
[out]dstDestination tensor. 4 lower dimensions represent a single dst [OFM, width, height, depth], while the rest represent batch of dsts.
[in]conv3d_infoContains strides, padding, rounding, activation, dilation and fast math information. Activation and fast math are currently unused.

Definition at line 92 of file ClDirectConv3dKernel.cpp.

References CLBuildOptions::add_option(), arm_compute::adjust_vec_size(), ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, build_options, arm_compute::calculate_max_window(), arm_compute::quantization::calculate_quantized_multiplier(), conv_stride_x, conv_stride_y, arm_compute::create_kernel(), arm_compute::test::validation::data_type, ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::F32, Padding3D::front, PixelValue::get(), arm_compute::get_cl_type_from_data_type(), arm_compute::is_data_type_quantized(), kernel_name, Padding3D::left, arm_compute::lower_string(), UniformQuantizationInfo::offset, CLBuildOptions::options(), Conv3dInfo::padding, ITensorInfo::quantization_info(), arm_compute::S32, UniformQuantizationInfo::scale, Conv3dInfo::stride, arm_compute::string_from_data_type(), ITensorInfo::tensor_shape(), arm_compute::support::cpp11::to_string(), Padding3D::top, arm_compute::utils::cast::U, QuantizationInfo::uniform(), arm_compute::cpu::kernels::validate_arguments(), weights_height, weights_width, Size3D::x(), Size3D::y(), and Size3D::z().

94 {
95  ARM_COMPUTE_ERROR_ON_NULLPTR(src0, src1, dst);
96 
97  // Perform validation
98  ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(src0, src1, src2, dst, conv3d_info));
99 
100  // Create window and update padding
101  const DataType data_type = src0->data_type();
102  const size_t src_width = src0->dimension(1);
103  const size_t src_height = src0->dimension(2);
104  const size_t src_depth = src0->dimension(3);
105  const size_t src_channels = src0->dimension(0);
106  const size_t dst_width = dst->dimension(1);
107  const size_t dst_height = dst->dimension(2);
108  const size_t dst_depth = dst->dimension(3);
109  const size_t dst_channels = dst->dimension(0);
110  const size_t weights_width = src1->dimension(2);
111  const size_t weights_height = src1->dimension(3);
112  const size_t weights_depth = src1->dimension(4);
113  const size_t pad_left = conv3d_info.padding.left;
114  const size_t pad_top = conv3d_info.padding.top;
115  const size_t pad_front = conv3d_info.padding.front;
116  const size_t conv_stride_x = conv3d_info.stride.x();
117  const size_t conv_stride_y = conv3d_info.stride.y();
118  const size_t conv_stride_z = conv3d_info.stride.z();
119 
120  const size_t n0 = std::min(dst->dimension(0), static_cast<size_t>(4u));
121  const size_t m0 = (dst->tensor_shape()[0] > 16) ? ((data_type == DataType::F32) ? 2U : 4U) : 1U;
122  const size_t k0 = adjust_vec_size(8u, src0->dimension(0));
123  const size_t partial_store_n0 = dst->dimension(0) % n0;
124 
125  CLBuildOptions build_options;
126  build_options.add_option("-cl-fast-relaxed-math");
127  build_options.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(data_type));
128  build_options.add_option("-DSRC_WIDTH=" + support::cpp11::to_string(src_width));
129  build_options.add_option("-DSRC_HEIGHT=" + support::cpp11::to_string(src_height));
130  build_options.add_option("-DSRC_DEPTH=" + support::cpp11::to_string(src_depth));
131  build_options.add_option("-DSRC_CHANNELS=" + support::cpp11::to_string(src_channels));
132  build_options.add_option("-DDST_WIDTH=" + support::cpp11::to_string(dst_width));
133  build_options.add_option("-DDST_HEIGHT=" + support::cpp11::to_string(dst_height));
134  build_options.add_option("-DDST_DEPTH=" + support::cpp11::to_string(dst_depth));
135  build_options.add_option("-DDST_CHANNELS=" + support::cpp11::to_string(dst_channels));
136  build_options.add_option("-DWEI_WIDTH=" + support::cpp11::to_string(weights_width));
137  build_options.add_option("-DWEI_HEIGHT=" + support::cpp11::to_string(weights_height));
138  build_options.add_option("-DWEI_DEPTH=" + support::cpp11::to_string(weights_depth));
139  build_options.add_option("-DSTRIDE_X=" + support::cpp11::to_string(conv_stride_x));
140  build_options.add_option("-DSTRIDE_Y=" + support::cpp11::to_string(conv_stride_y));
141  build_options.add_option("-DSTRIDE_Z=" + support::cpp11::to_string(conv_stride_z));
142  build_options.add_option("-DPAD_LEFT=" + support::cpp11::to_string(pad_left));
143  build_options.add_option("-DPAD_TOP=" + support::cpp11::to_string(pad_top));
144  build_options.add_option("-DPAD_FRONT=" + support::cpp11::to_string(pad_front));
145  build_options.add_option("-DN0=" + support::cpp11::to_string(n0));
146  build_options.add_option("-DM0=" + support::cpp11::to_string(m0));
147  build_options.add_option("-DK0=" + support::cpp11::to_string(k0));
148  build_options.add_option("-DPARTIAL_N0=" + support::cpp11::to_string(partial_store_n0));
149 
150  if(src2 != nullptr)
151  {
152  build_options.add_option(std::string("-DHAS_BIAS"));
153  build_options.add_option(std::string("-DBIA_DATA_TYPE=" + get_cl_type_from_data_type(src2->data_type())));
154  }
155 
156  if(is_data_type_quantized(data_type))
157  {
158  const UniformQuantizationInfo iqinfo = src0->quantization_info().uniform();
159  const UniformQuantizationInfo wqinfo = src1->quantization_info().uniform();
160  const UniformQuantizationInfo oqinfo = dst->quantization_info().uniform();
161 
162  PixelValue zero_value = PixelValue(0, src0->data_type(), src0->quantization_info());
163  int zero_value_s32;
164  zero_value.get(zero_value_s32);
165 
166  float multiplier = iqinfo.scale * wqinfo.scale / oqinfo.scale;
167  int output_multiplier = 0;
168  int output_shift = 0;
169  quantization::calculate_quantized_multiplier(multiplier, &output_multiplier, &output_shift);
170  build_options.add_option("-DIS_QUANTIZED");
171  build_options.add_option("-DDST_MULTIPLIER=" + support::cpp11::to_string(output_multiplier));
172  build_options.add_option("-DDST_SHIFT=" + support::cpp11::to_string(output_shift));
173  build_options.add_option("-DSRC_OFFSET=" + support::cpp11::to_string(-iqinfo.offset));
174  build_options.add_option("-DWEI_OFFSET=" + support::cpp11::to_string(-wqinfo.offset));
175  build_options.add_option("-DDST_OFFSET=" + support::cpp11::to_string(oqinfo.offset));
176  build_options.add_option("-DZERO_VALUE=" + support::cpp11::to_string(zero_value_s32));
177  build_options.add_option("-DACC_DATA_TYPE=" + get_cl_type_from_data_type(DataType::S32));
178  }
179  else
180  {
181  build_options.add_option("-DACC_DATA_TYPE=" + get_cl_type_from_data_type(DataType::F32));
182  build_options.add_option("-DZERO_VALUE=" + support::cpp11::to_string(0));
183  build_options.add_option("-DSRC_OFFSET=" + support::cpp11::to_string(0));
184  build_options.add_option("-DWEI_OFFSET=" + support::cpp11::to_string(0));
185  build_options.add_option("-DDST_OFFSET=" + support::cpp11::to_string(0));
186  }
187 
188  std::string kernel_name = "direct_convolution3d_ndhwc";
189  _kernel = create_kernel(compile_context, kernel_name, build_options.options());
190 
191  // Configure kernel window
192  Window win = calculate_max_window(*dst, Steps(n0, m0));
193  ICLKernel::configure_internal(win);
194 
195  // Set config_id for enabling LWS tuning
196  _config_id = kernel_name;
197  _config_id += "_";
198  _config_id += lower_string(string_from_data_type(data_type));
199  _config_id += "_";
200  _config_id += support::cpp11::to_string(weights_width);
201  _config_id += "_";
202  _config_id += support::cpp11::to_string(weights_height);
203  _config_id += "_";
204  _config_id += support::cpp11::to_string(weights_depth);
205  _config_id += "_";
206  _config_id += support::cpp11::to_string(conv_stride_x);
207  _config_id += "_";
208  _config_id += support::cpp11::to_string(conv_stride_y);
209  _config_id += "_";
210  _config_id += support::cpp11::to_string(conv_stride_z);
211  _config_id += "_";
212  _config_id += support::cpp11::to_string(dst_width);
213  _config_id += "_";
214  _config_id += support::cpp11::to_string(dst_height);
215  _config_id += "_";
216  _config_id += support::cpp11::to_string(dst_channels);
217 }
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
Definition: Utils.h:1030
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
std::string to_string(T &&value)
Convert integer and float values to string.
1 channel, 1 F32 per channel
#define ARM_COMPUTE_ERROR_THROW_ON(status)
Definition: Error.h:455
Status calculate_quantized_multiplier(float multiplier, int32_t *quant_multiplier, int32_t *shift, bool ignore_epsilon=false)
Calculate quantized representation of multiplier.
std::string lower_string(const std::string &val)
Lower a given string.
Definition: Utils.cpp:353
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
std::set< std::string > build_options
1 channel, 1 S32 per channel
const size_t conv_stride_y
Definition: impl.cpp:58
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:404
const std::string & string_from_data_type(DataType dt)
Convert a data type identity into a string.
Definition: Utils.cpp:135
std::string get_cl_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL type.
Definition: CLHelpers.cpp:39
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Definition: Validate.h:157
const size_t weights_width
Definition: impl.cpp:53
const size_t weights_height
Definition: impl.cpp:54
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&#39;s first dimension, getting rounded down to its closest valid vector size.
Definition: Utils.h:1222
std::string kernel_name
DataType
Available data types.
Definition: Types.h:79
const size_t conv_stride_x
Definition: impl.cpp:57

◆ operator=() [1/2]

ClDirectConv3dKernel& operator= ( const ClDirectConv3dKernel )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

ClDirectConv3dKernel& operator= ( ClDirectConv3dKernel &&  )
default

Default move assignment operator.

◆ 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 225 of file ClDirectConv3dKernel.cpp.

References arm_compute::ACL_DST, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, arm_compute::ACL_SRC_2, ICLKernel::add_1D_tensor_argument(), ICLKernel::add_4D_tensor_argument(), ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, arm_compute::ceil_to_multiple(), Window::DimY, Window::DimZ, arm_compute::enqueue(), Window::first_slice_window_3D(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), ICLKernel::lws_hint(), Window::set(), arm_compute::test::validation::reference::slice(), arm_compute::test::validation::src, and IKernel::window().

226 {
229 
230  const auto src = utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_0));
231  const auto weights = utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_1));
232  const auto biases = utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_2));
233  auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST));
234 
235  // Get initial windows
237  slice.set(Window::DimY, Window::Dimension(0, ceil_to_multiple(dst->info()->dimension(1) * dst->info()->dimension(2) * dst->info()->dimension(3), slice.y().step()), slice.y().step()));
238  slice.set(Window::DimZ, Window::Dimension(0, dst->info()->dimension(4), 1));
239 
240  unsigned int idx = 0;
241  add_4D_tensor_argument(idx, src, slice);
242  add_4D_tensor_argument(idx, dst, slice);
243  add_4D_tensor_argument(idx, weights, slice);
244  if(biases != nullptr)
245  {
246  add_1D_tensor_argument(idx, biases, slice);
247  }
248  enqueue(queue, *this, slice, lws_hint());
249 }
const Window & window() const
The maximum window the kernel can be executed on.
Definition: IKernel.cpp:28
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:32
cl::NDRange lws_hint() const
Return the Local-Workgroup-Size hint.
Definition: ICLKernel.h:383
SimpleTensor< float > src
Definition: DFT.cpp:155
auto ceil_to_multiple(S value, T divisor) -> decltype(((value+divisor - 1)/divisor) *divisor)
Computes the smallest number larger or equal to value that is a multiple of divisor.
Definition: Utils.h:71
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
Definition: Window.inl:49
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
Definition: Validate.h:915
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Definition: Window.h:47
void add_1D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 1D tensor&#39;s parameters to the object&#39;s kernel&#39;s arguments starting from the index idx...
Definition: ICLKernel.h:178
Window first_slice_window_3D() const
First 3D slice of the window.
Definition: Window.h:305
void add_4D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 4D tensor&#39;s parameters to the object&#39;s kernel&#39;s arguments starting from the index idx...
Definition: ICLKernel.h:236
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
Definition: Validate.h:201
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

◆ validate()

Status validate ( const ITensorInfo src0,
const ITensorInfo src1,
const ITensorInfo src2,
const ITensorInfo dst,
const Conv3dInfo conv3d_info 
)
static

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

Similar to ClDirectConv3dKernel::configure()

Returns
a status

Definition at line 219 of file ClDirectConv3dKernel.cpp.

References ARM_COMPUTE_RETURN_ON_ERROR, and arm_compute::cpu::kernels::validate_arguments().

Referenced by ClDirectConv3d::validate().

220 {
221  ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(src0, src1, src2, dst, conv3d_info));
222  return Status{};
223 }
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:204
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)

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