diff options
author | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-10-24 11:05:56 +0100 |
---|---|---|
committer | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-10-31 14:23:31 +0000 |
commit | 704c22f1373e1276acb43c71e7e17048271bbc03 (patch) | |
tree | 7cf8b5d4730c6482229a228215dd80b794088735 /tests/validation/fixtures/ReverseFixture.h | |
parent | 8f4b3df4c59c7b1c3fbea5b559862fcefeba14bf (diff) | |
download | ComputeLibrary-704c22f1373e1276acb43c71e7e17048271bbc03.tar.gz |
[GPU] Update Reverse layer to allow negative axis and reversed axis order
- Adds option to use negative axis and inverted axis.
- Adds validation tests for the above.
Resolves COMPMID-6459
Change-Id: I88afd845d078f92c82ec8529ce7241fccd4c417e
Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10523
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures/ReverseFixture.h')
-rw-r--r-- | tests/validation/fixtures/ReverseFixture.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/tests/validation/fixtures/ReverseFixture.h b/tests/validation/fixtures/ReverseFixture.h index d53945191e..856bff7b12 100644 --- a/tests/validation/fixtures/ReverseFixture.h +++ b/tests/validation/fixtures/ReverseFixture.h @@ -27,9 +27,6 @@ #include "arm_compute/core/Helpers.h" #include "arm_compute/core/TensorShape.h" #include "arm_compute/core/Types.h" -#ifdef ARM_COMPUTE_OPENCL_ENABLED -#include "arm_compute/runtime/CL/functions/CLReverse.h" -#endif // ARM_COMPUTE_OPENCL_ENABLED #include "arm_compute/runtime/Tensor.h" #include "tests/AssetsLibrary.h" #include "tests/Globals.h" @@ -44,31 +41,6 @@ namespace test { namespace validation { -namespace -{ -template <typename ReverseFunction, typename TensorType> -#ifdef ARM_COMPUTE_OPENCL_ENABLED -std::enable_if_t < !std::is_same<ReverseFunction, CLReverse>::value, void > -#else // ARM_COMPUTE_OPENCL_ENABLED -void -#endif // ARM_COMPUTE_OPENCL_ENABLED -configureReverse(ReverseFunction &func, TensorType &src, TensorType &axis, TensorType &dst, bool use_inverted_axis) -{ - func.configure(&src, &dst, &axis, use_inverted_axis); -} - -#ifdef ARM_COMPUTE_OPENCL_ENABLED -template <typename ReverseFunction, typename TensorType> -std::enable_if_t<std::is_same<ReverseFunction, CLReverse>::value, void> -configureReverse(ReverseFunction &func, TensorType &src, TensorType &axis, TensorType &dst, bool use_inverted_axis) -{ - ARM_COMPUTE_UNUSED(use_inverted_axis); - func.configure(&src, &dst, &axis); -} - -#endif // ARM_COMPUTE_OPENCL_ENABLED -} //namespace - template <typename TensorType, typename AccessorType, typename FunctionType, typename T> class ReverseValidationFixture : public framework::Fixture { @@ -113,8 +85,7 @@ protected: // Create and configure function FunctionType reverse_func; - - configureReverse(reverse_func, src, axis, dst, use_inverted_axis); + reverse_func.configure(&src, &dst, &axis, use_inverted_axis); ARM_COMPUTE_ASSERT(src.info()->is_resizable()); ARM_COMPUTE_ASSERT(axis.info()->is_resizable()); |