aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/backendsCommon/test')
-rw-r--r--src/backends/backendsCommon/test/GatherTestImpl.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/backends/backendsCommon/test/GatherTestImpl.hpp b/src/backends/backendsCommon/test/GatherTestImpl.hpp
index 16b266ed29..8fbfeeae3d 100644
--- a/src/backends/backendsCommon/test/GatherTestImpl.hpp
+++ b/src/backends/backendsCommon/test/GatherTestImpl.hpp
@@ -63,6 +63,13 @@ LayerTestResult<T, 1> Gather1DParamsTestImpl(armnn::IWorkloadFactory& workloadFa
armnn::TensorInfo indicesInfo({ 4 }, armnn::DataType::Signed32);
armnn::TensorInfo outputInfo({ 4 }, ArmnnType);
+ if (armnn::IsQuantizedType<T>())
+ {
+ paramsInfo.SetQuantizationScale(1.0f);
+ paramsInfo.SetQuantizationOffset(1);
+ outputInfo.SetQuantizationScale(1.0f);
+ outputInfo.SetQuantizationOffset(1);
+ }
const std::vector<T> params = std::vector<T>({ 1, 2, 3, 4, 5, 6, 7, 8 });
const std::vector<int32_t> indices = std::vector<int32_t>({ 0, 2, 1, 5 });
const std::vector<T> expectedOutput = std::vector<T>({ 1, 3, 2, 6 });
@@ -80,6 +87,14 @@ LayerTestResult<T, 2> GatherMultiDimParamsTestImpl(
armnn::TensorInfo indicesInfo({ 3 }, armnn::DataType::Signed32);
armnn::TensorInfo outputInfo({ 3, 2 }, ArmnnType);
+ if (armnn::IsQuantizedType<T>())
+ {
+ paramsInfo.SetQuantizationScale(1.0f);
+ paramsInfo.SetQuantizationOffset(1);
+ outputInfo.SetQuantizationScale(1.0f);
+ outputInfo.SetQuantizationOffset(1);
+ }
+
const std::vector<T> params = std::vector<T>({ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
const std::vector<int32_t> indices = std::vector<int32_t>({ 1, 3, 4 });
const std::vector<T> expectedOutput = std::vector<T>({ 3, 4, 7, 8, 9, 10 });
@@ -97,6 +112,14 @@ LayerTestResult<T, 4> GatherMultiDimParamsMultiDimIndicesTestImpl(
armnn::TensorInfo indicesInfo({ 2, 3 }, armnn::DataType::Signed32);
armnn::TensorInfo outputInfo({ 2, 3, 2, 3 }, ArmnnType);
+ if (armnn::IsQuantizedType<T>())
+ {
+ paramsInfo.SetQuantizationScale(1.0f);
+ paramsInfo.SetQuantizationOffset(1);
+ outputInfo.SetQuantizationScale(1.0f);
+ outputInfo.SetQuantizationOffset(1);
+ }
+
const std::vector<T> params = std::vector<T>({
1, 2, 3,
4, 5, 6,