From a9cd086586caf671507e352bdd3a80e5834f2bd7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 31 May 2018 11:41:36 +0900 Subject: [PATCH] [NNAPI test] Introduce asserts on input types (#1457) This commit introduces asserts on input types as float32 is the only input type that nnapi_test supports currently. Signed-off-by: Jonghyun Park --- libs/support/tflite/src/Diff.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/support/tflite/src/Diff.cpp b/libs/support/tflite/src/Diff.cpp index 99f3174..2a07389 100644 --- a/libs/support/tflite/src/Diff.cpp +++ b/libs/support/tflite/src/Diff.cpp @@ -220,6 +220,12 @@ int RandomTestRunner::run(const nnfw::support::tflite::interp::Builder &builder) for (const auto id : pure->inputs()) { + assert(pure->tensor(id)->type == nnapi->tensor(id)->type); + + // NOTE Float inputs are supported currently + assert(pure->tensor(id)->type == kTfLiteFloat32); + assert(nnapi->tensor(id)->type == kTfLiteFloat32); + auto pure_view = nnfw::support::tflite::TensorView::make(*pure, id); auto nnapi_view = nnfw::support::tflite::TensorView::make(*nnapi, id); -- 2.7.4