From 4c6bd514a8d424a29b776754f1b3426fa3a8c339 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 8 Apr 2020 10:15:51 +0100 Subject: COMPMID-3280: Make all ML primitives for CL use the new interface - Part 1 - Only CLKernels have been updated Change-Id: Ife55b847c2e39e712a186eb6ca452503d5b66937 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3001 Reviewed-by: Michele Di Giorgio Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp index d1dfcd9bb1..ff3d106f46 100644 --- a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp +++ b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp @@ -422,6 +422,12 @@ BorderSize CLDirectConvolutionLayerKernel::border_size() const } void CLDirectConvolutionLayerKernel::configure(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info) +{ + configure(CLKernelLibrary::get().get_compile_context(), input, weights, biases, output, conv_info); +} + +void CLDirectConvolutionLayerKernel::configure(CLCompileContext &compile_context, const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, + const PadStrideInfo &conv_info) { ARM_COMPUTE_ERROR_ON_NULLPTR(input, weights, output); @@ -491,7 +497,7 @@ void CLDirectConvolutionLayerKernel::configure(const ICLTensor *input, const ICL build_options.add_option(std::string("-DWEIGHTS_DEPTH=" + support::cpp11::to_string(_weights->info()->dimension(channel_idx)))); kernel_name << "_f32_bifrost"; - _kernel = static_cast(CLKernelLibrary::get().create_kernel(kernel_name.str(), build_options.options())); + _kernel = create_kernel(compile_context, kernel_name.str(), build_options.options()); } else { @@ -535,7 +541,7 @@ void CLDirectConvolutionLayerKernel::configure(const ICLTensor *input, const ICL build_options.add_option("-DKERNEL_SIZE=" + support::cpp11::to_string(kernel_size)); // Create kernel - _kernel = static_cast(CLKernelLibrary::get().create_kernel("direct_convolution_quantized", build_options.options())); + _kernel = create_kernel(compile_context, "direct_convolution_quantized", build_options.options()); // Set static kernel arguments unsigned int idx = 3 * num_arguments_per_3D_tensor() + ((_biases != nullptr) ? num_arguments_per_1D_tensor() : 0) + 1; @@ -546,7 +552,7 @@ void CLDirectConvolutionLayerKernel::configure(const ICLTensor *input, const ICL else { // Create kernel - _kernel = static_cast(CLKernelLibrary::get().create_kernel(kernel_name.str(), build_options.options())); + _kernel = create_kernel(compile_context, kernel_name.str(), build_options.options()); } } -- cgit v1.2.1