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-23 17:53:59 +0000 |
commit | 2b84be544e4a27f7e8e80827e9c85c8f0d58b4ce (patch) | |
tree | 078051a911f9b8883a3f11955cfd3b7ba0d7d9f3 /src/runtime/CL/functions/CLConvolutionLayer.cpp | |
parent | 0de45d0a8009e19331c4e29d617fa183167c513a (diff) | |
download | ComputeLibrary-2b84be544e4a27f7e8e80827e9c85c8f0d58b4ce.tar.gz |
COMPMID-3280: Make all ML primitives for CL use the new interface - Part 2
- CLFunctions have been updated
Change-Id: Ie3256a6c775bc12f3126482bd8e8a46da54b267c
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3053
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLConvolutionLayer.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLConvolutionLayer.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/runtime/CL/functions/CLConvolutionLayer.cpp b/src/runtime/CL/functions/CLConvolutionLayer.cpp index c271f502e9..b6e1413f7a 100644 --- a/src/runtime/CL/functions/CLConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 ARM Limited. + * Copyright (c) 2017-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -46,6 +46,13 @@ CLConvolutionLayer::CLConvolutionLayer(std::shared_ptr<IMemoryManager> memory_ma void CLConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, const WeightsInfo &weights_info, const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups) { + configure(CLKernelLibrary::get().get_compile_context(), input, weights, biases, output, conv_info, weights_info, dilation, act_info, enable_fast_math, num_groups); +} + +void CLConvolutionLayer::configure(const CLCompileContext &compile_context, ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, + const WeightsInfo &weights_info, + const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups) +{ ARM_COMPUTE_ERROR_ON_NULLPTR(input, weights, output); ARM_COMPUTE_ERROR_THROW_ON(CLConvolutionLayer::validate(input->info(), weights->info(), ((biases != nullptr) ? biases->info() : nullptr), output->info(), conv_info, weights_info, dilation, act_info, enable_fast_math, num_groups)); @@ -57,7 +64,7 @@ void CLConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights, c { ARM_COMPUTE_ERROR_ON(num_groups != 1); auto f = arm_compute::support::cpp14::make_unique<CLWinogradConvolutionLayer>(_memory_manager); - f->configure(input, weights, biases, output, conv_info, act_info, enable_fast_math); + f->configure(compile_context, input, weights, biases, output, conv_info, act_info, enable_fast_math); _function = std::move(f); break; } @@ -65,21 +72,21 @@ void CLConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights, c { ARM_COMPUTE_ERROR_ON(num_groups != 1); auto f = arm_compute::support::cpp14::make_unique<CLDirectConvolutionLayer>(); - f->configure(input, weights, biases, output, conv_info, act_info); + f->configure(compile_context, input, weights, biases, output, conv_info, act_info); _function = std::move(f); break; } case ConvolutionMethod::GEMM: { auto f = arm_compute::support::cpp14::make_unique<CLGEMMConvolutionLayer>(_memory_manager); - f->configure(input, weights, biases, output, conv_info, weights_info, dilation, act_info, num_groups); + f->configure(compile_context, input, weights, biases, output, conv_info, weights_info, dilation, act_info, num_groups); _function = std::move(f); break; } case ConvolutionMethod::FFT: { auto f = arm_compute::support::cpp14::make_unique<CLFFTConvolutionLayer>(_memory_manager); - f->configure(input, weights, biases, output, conv_info, act_info); + f->configure(compile_context, input, weights, biases, output, conv_info, act_info); _function = std::move(f); break; } |