24.02.1
|
Go to the documentation of this file.
32 #ifndef ACL_INTERNAL_TEST_CKW_IN_DF
34 #else // ACL_INTERNAL_TEST_CKW_IN_DF
36 #endif // ACL_INTERNAL_TEST_CKW_IN_DF
40 namespace experimental
42 namespace dynamic_fusion
57 return _fast_relaxed_math;
116 "Weights feature map dimension should match the respective src's one");
121 attributes.
pad().right, attributes.
pad().top, attributes.
pad().bottom,
130 "Biases size and number of dst feature maps should match");
143 "N0 can only be: 1, 2, 3, 4, 8, and 16");
146 "K0 can only be: 1, 2, 3, 4, 8, and 16");
156 #ifndef ACL_INTERNAL_TEST_CKW_IN_DF
157 _component_writer{std::make_unique<ClTemplateDirectConv2d>(
id, tensors, attributes, settings)}
158 #else // ACL_INTERNAL_TEST_CKW_IN_DF
159 _component_writer{std::make_unique<GpuCkwDirectConv2d>(
id, tensors, attributes, settings)}
160 #endif // ACL_INTERNAL_TEST_CKW_IN_DF
168 #ifndef ACL_INTERNAL_TEST_CKW_IN_DF
170 #else // ACL_INTERNAL_TEST_CKW_IN_DF
172 #endif // ACL_INTERNAL_TEST_CKW_IN_DF
174 return _component_writer.get();
Conv2dAttributes & pad(const Padding2D &pad)
Set padding.
SimpleTensor< float > src
DataLayout
[DataLayout enum definition]
Component specific settings.
@ NHWC
Num samples, height, width, channels.
bool export_to_cl_image() const
Get export_to_cl_image flag.
DimensionRoundingType
Dimension rounding type when down-scaling on CNNs.
An interface used by ClTemplateWriter to write source code for a kernel component.
This is a generic class that packs the arguments of an operator.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
constexpr auto data_layout
ClComponentDirectConv2d(ComponentId id, const Properties &properties, const ArgumentPack< ITensorInfo > &tensors, const Attributes &attributes, const Settings &settings)
Constructor.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
Conv2dAttributes & stride(const Size2D &stride)
Set stride.
const IGpuTemplateComponentWriter * template_writer() const override
Get writer for the component.
~ClComponentDirectConv2d() override
Destructor.
virtual const IGpuCkwComponentDriver * ckw_component_driver() const
Properties common to all kernel component types.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
#define ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(tensor)
bool fast_relaxed_math() const
Get fast_relaxed_math flag.
Properties properties() const
Get properties.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(...)
An interface used by GpuCkwDriver to write source code for a kernel component.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_LAYOUT_NOT_IN(t,...)
int32_t ComponentId
Uniquely identifies a kernel component within a workload.
size_t get_data_layout_dimension_index(const DataLayout &data_layout, const DataLayoutDimension &data_layout_dimension)
Get the index of the given dimension.
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Copyright (c) 2017-2024 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
ClComponentDirectConv2dSettings & direct_conv_descriptor(const DirectConvComputeKernelInfo &desc)
Set direct convolution descriptor.
@ F16
16-bit floating-point number
bool export_weights_to_cl_image
Flag to export the weights to cl_image.
An abstract interface of a component.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
@ F32
32-bit floating-point number
ArgumentPack< ITensorInfo > tensors() const
Get tensor arguments.
DirectConvComputeKernelInfo direct_conv_descriptor() const
Get direct convolution descriptor.
TensorShape compute_deep_convolution_shape(const TensorShape &input_shape, DataLayout input_data_layout, const TensorShape &weights_shape, const PadStrideInfo &conv_info)
Calculate the deep convolution shape output shape of a tensor.
static Status validate(const Properties &properties, const ArgumentPack< ITensorInfo > &tensors, const Attributes &attributes, const Settings &settings)
Validate the component.
ComponentId id() const
Get component id.
Compute descriptor used by the direct convolution kernel.