aboutsummaryrefslogtreecommitdiff
path: root/src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2022-11-17 11:03:39 +0000
committerGian Marco Iodice <gianmarco.iodice@arm.com>2022-12-09 11:06:23 +0000
commit76335eb8d8733b0bbc0110546797211540870c50 (patch)
tree812fc44de593c9e1e45ac8b534094511b06163bf /src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp
parentf16973b8b4605f12608bffa9f0ca6ed590202d41 (diff)
downloadComputeLibrary-76335eb8d8733b0bbc0110546797211540870c50.tar.gz
Implement the OpenCL kernel to compute the indirect convolution
- Implement indirect convolution kernel - Add operator support - Add test Resolves COMPMID-5709 Change-Id: I9272304163471a5a40da7fdec204599f3c1d8e32 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8701 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp')
-rw-r--r--src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp b/src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp
index 95186fe106..8e12f23fa6 100644
--- a/src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp
+++ b/src/gpu/cl/kernels/ClIndirectConv2dAddressPrecalculationKernel.cpp
@@ -80,8 +80,8 @@ void ClIndirectConv2dAddressPrecalculationKernel::configure(const CLCompileConte
ARM_COMPUTE_ERROR_ON_NULLPTR(src, weights, dst);
ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(src, weights, dst, conv_info, desc));
- constexpr unsigned int width_idx = 1;
- constexpr unsigned int height_idx = 2;
+ constexpr unsigned int width_idx = 1;
+ constexpr unsigned int height_idx = 2;
// Get dst shape
TensorShape output_shape = misc::shape_calculator::compute_indirect_buffer_shape(src->tensor_shape(),
@@ -127,6 +127,9 @@ void ClIndirectConv2dAddressPrecalculationKernel::configure(const CLCompileConte
build_options.add_option("-DPAD_TOP=" + support::cpp11::to_string(pad_top));
build_options.add_option("-DM0=" + support::cpp11::to_string(desc.m0));
+ // A macro guard to compile ONLY the kernel of interest
+ build_options.add_option("-D" + upper_string(kernel_name.str()));
+
_kernel = create_kernel(compile_context, kernel_name.str(), build_options.options());
// Since this kernel should be called only once, we do not need to set the config_id for tuning