diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-05-04 17:39:30 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-05-05 14:15:49 +0000 |
commit | edafe7f5fdc056fddc395c70420fc869dcb7d9fb (patch) | |
tree | 7506f77d1f0377e058f58707387b838834556bd1 /src/runtime/CL/functions | |
parent | 76e7b63401bf01875de8beda2198df36ca6a7bc9 (diff) | |
download | ComputeLibrary-edafe7f5fdc056fddc395c70420fc869dcb7d9fb.tar.gz |
Disable dynamic weights in unsupported operators
Resolves: COMPMID-6185
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: Icfd9d177083ecdf41dc13e5b2ae982ff67492f8a
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9577
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions')
-rw-r--r-- | src/runtime/CL/functions/CLConvolutionLayer.cpp | 3 | ||||
-rw-r--r-- | src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLConvolutionLayer.cpp b/src/runtime/CL/functions/CLConvolutionLayer.cpp index 384249fc63..476bf27423 100644 --- a/src/runtime/CL/functions/CLConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022 Arm Limited. + * Copyright (c) 2017-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -130,6 +130,7 @@ Status CLConvolutionLayer::validate(const ITensorInfo *input, const ITensorInfo const WeightsInfo &weights_info, const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups, const experimental::PostOpList<ITensorInfo *> &post_ops) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output); + ARM_COMPUTE_RETURN_ERROR_ON_MSG(!weights->are_values_constant(), "Dynamic weights are not supported"); ARM_COMPUTE_RETURN_ERROR_ON_MSG((num_groups != 1) && (input->data_layout() != DataLayout::NCHW), "Grouping (num_groups != 1) with NHWC data layout is not supported"); const GPUTarget gpu_target = CLScheduler::get().target(); diff --git a/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp b/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp index 3909c15352..dcb982fa56 100644 --- a/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022 Arm Limited. + * Copyright (c) 2017-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -162,6 +162,9 @@ Status CLDepthwiseConvolutionLayer::validate(const ITensorInfo *input, const ITe const PadStrideInfo &conv_info, unsigned int depth_multiplier, ActivationLayerInfo act_info, const Size2D &dilation) { + ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights); + ARM_COMPUTE_RETURN_ERROR_ON_MSG(!weights->are_values_constant(), "Dynamic weights are not supported"); + const bool in_place = input == output || output == nullptr; if(in_place) { |