diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-12-18 16:13:06 +0000 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2021-01-13 11:53:53 +0000 |
commit | 4cf0fe385b934de95c022cae4a2c400d0d52377d (patch) | |
tree | ee6f9ac5f4c4b1d9d981ec9aff8b45e818259687 /delegate/src/test/TestUtils.hpp | |
parent | fc78446118f65d78271136b33340c9fbb8c009f1 (diff) | |
download | armnn-4cf0fe385b934de95c022cae4a2c400d0d52377d.tar.gz |
IVGCVSW-5625 Add support for Float16 to Delegate
* Float16 unit tests for Reshape
* Remove unsupported data type from Pad
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: Ib1804bb6e708a0552fb40d05fe8a6511936f9793
Diffstat (limited to 'delegate/src/test/TestUtils.hpp')
-rw-r--r-- | delegate/src/test/TestUtils.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/delegate/src/test/TestUtils.hpp b/delegate/src/test/TestUtils.hpp index b165920762..ad7600d27e 100644 --- a/delegate/src/test/TestUtils.hpp +++ b/delegate/src/test/TestUtils.hpp @@ -5,10 +5,15 @@ #pragma once +#include <tensorflow/lite/c/common.h> #include <tensorflow/lite/interpreter.h> #include <doctest/doctest.h> +#include <half/half.hpp> + +using Half = half_float::half; + namespace armnnDelegate { @@ -43,6 +48,14 @@ void CompareData(uint8_t tensor1[], uint8_t tensor2[], size_t tensorSize); /// Can be used to compare int16_t data coming from a tflite interpreter with a tolerance of 1 void CompareData(int16_t tensor1[], int16_t tensor2[], size_t tensorSize); +/// Can be used to compare Half (Float16) data with a tolerance of limit_of_float*100 +void CompareData(Half tensor1[], Half tensor2[], size_t tensorSize); + +/// Can be used to compare TfLiteFloat16 data coming from a tflite interpreter +void CompareData(TfLiteFloat16 tensor1[], TfLiteFloat16 tensor2[], size_t tensorSize); + +/// Can be used to compare Half (Float16) data and TfLiteFloat16 data coming from a tflite interpreter +void CompareData(TfLiteFloat16 tensor1[], Half tensor2[], size_t tensorSize); /// Can be used to compare the output tensor shape and values /// from armnnDelegateInterpreter and tfLiteInterpreter. |