diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2020-04-08 10:15:51 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2020-04-17 14:10:38 +0000 |
commit | 4c6bd514a8d424a29b776754f1b3426fa3a8c339 (patch) | |
tree | ed20ea238ae069ab138b62ea6879e0c1b955b606 /src/core/CL/kernels/CLChannelCombineKernel.cpp | |
parent | d2f6d96cdc2ad2169c4abd0a8c4884f61ed6d186 (diff) | |
download | ComputeLibrary-4c6bd514a8d424a29b776754f1b3426fa3a8c339.tar.gz |
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 <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3001
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLChannelCombineKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLChannelCombineKernel.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/CL/kernels/CLChannelCombineKernel.cpp b/src/core/CL/kernels/CLChannelCombineKernel.cpp index d029efe110..90face2ccc 100644 --- a/src/core/CL/kernels/CLChannelCombineKernel.cpp +++ b/src/core/CL/kernels/CLChannelCombineKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 ARM Limited. + * Copyright (c) 2016-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -53,6 +53,11 @@ CLChannelCombineKernel::CLChannelCombineKernel() void CLChannelCombineKernel::configure(const ICLTensor *plane0, const ICLTensor *plane1, const ICLTensor *plane2, const ICLTensor *plane3, ICLTensor *output) { + configure(CLKernelLibrary::get().get_compile_context(), plane0, plane1, plane2, plane3, output); +} + +void CLChannelCombineKernel::configure(CLCompileContext &compile_context, const ICLTensor *plane0, const ICLTensor *plane1, const ICLTensor *plane2, const ICLTensor *plane3, ICLTensor *output) +{ ARM_COMPUTE_ERROR_ON_NULLPTR(plane0, plane1, plane2, output); ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(plane0); ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(plane1); @@ -109,7 +114,7 @@ void CLChannelCombineKernel::configure(const ICLTensor *plane0, const ICLTensor // Create kernel std::string kernel_name = "channel_combine_" + string_from_format(output_format); - _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name)); + _kernel = create_kernel(compile_context, kernel_name); // Configure window Window win = calculate_max_window(*output->info(), Steps(num_elems_processed_per_iteration)); @@ -136,6 +141,11 @@ void CLChannelCombineKernel::configure(const ICLTensor *plane0, const ICLTensor void CLChannelCombineKernel::configure(const ICLImage *plane0, const ICLImage *plane1, const ICLImage *plane2, ICLMultiImage *output) { + configure(CLKernelLibrary::get().get_compile_context(), plane0, plane1, plane2, output); +} + +void CLChannelCombineKernel::configure(CLCompileContext &compile_context, const ICLImage *plane0, const ICLImage *plane1, const ICLImage *plane2, ICLMultiImage *output) +{ ARM_COMPUTE_ERROR_ON_NULLPTR(plane0, plane1, plane2, output); ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(plane0); ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(plane1); @@ -211,7 +221,7 @@ void CLChannelCombineKernel::configure(const ICLImage *plane0, const ICLImage *p } // Create kernel - _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts)); + _kernel = create_kernel(compile_context, kernel_name, build_opts); // Configure window Window win = calculate_max_window(*plane0->info(), Steps(num_elems_processed_per_iteration)); |