diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2021-02-08 16:31:10 +0000 |
---|---|---|
committer | Giorgio Arena <giorgio.arena@arm.com> | 2021-03-02 09:03:00 +0000 |
commit | 68e29dab4ada6e3457f066c3cf45acf51a204dd9 (patch) | |
tree | a920ebfb51ba39f7b015c919d4e65d71ffbf94be /tests/CL/CLAccessor.h | |
parent | c1b9b098518211d6f356650a0ce5022a36c623e9 (diff) | |
download | ComputeLibrary-68e29dab4ada6e3457f066c3cf45acf51a204dd9.tar.gz |
Set up configure-only flag for validation. First trial with DepthwiseConvoltion
This is needed in order to validate OpenCL kernel run-time compilation, without necessarily running or validating the kernels' execution
- Add a run-time option for our validation suite to only configure one target function, without allocating, running or validating
- Avoid to map/unmap tensors in CLAccessor if no allocation/validation is required
- Create a new Fixture macro that accepts fixtures split into configure/allocate_and_run/reference, and do the last two only if required
- Adjust fixture and validation files for the first trial function(s) (DepthwiseConvolutionLayer)
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Change-Id: I56fa1ce5ef4ac0c86bcabda686cc277ef5ec69c8
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5048
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Diffstat (limited to 'tests/CL/CLAccessor.h')
-rw-r--r-- | tests/CL/CLAccessor.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/CL/CLAccessor.h b/tests/CL/CLAccessor.h index d127def325..ef1983364b 100644 --- a/tests/CL/CLAccessor.h +++ b/tests/CL/CLAccessor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -26,6 +26,7 @@ #include "arm_compute/runtime/CL/CLTensor.h" #include "tests/IAccessor.h" +#include "tests/framework/Framework.h" namespace arm_compute { @@ -86,12 +87,18 @@ private: inline CLAccessor::CLAccessor(CLTensor &tensor) : _tensor{ tensor } { - _tensor.map(); + if(!framework::Framework::get().configure_only() || !framework::Framework::get().new_fixture_call()) + { + _tensor.map(); + } } inline CLAccessor::~CLAccessor() { - _tensor.unmap(); + if(!framework::Framework::get().configure_only() || !framework::Framework::get().new_fixture_call()) + { + _tensor.unmap(); + } } inline TensorShape CLAccessor::shape() const |