From f44d4d3cc99da338fb580fbc2a3991b22d0116ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EA=B9=80=EC=88=98=EC=A7=84/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 30 Jan 2019 17:05:54 +0900 Subject: [PATCH] [neurun] Remove asserts for SoftMax validation to support tensors (#4361) Removed asserts for `SoftMax` in `PACL` to support tensors. These asserts copied from `PACL` before changing. This commit removes asserts for `SoftMax validation` to support tensors on `neurun` too. And removes test skip list related `SoftMax`. Signed-off-by: sjsujinkim --- runtimes/neurun/src/backend/acl_cl/StageGenerator.cc | 2 -- runtimes/neurun/src/compiler/OperationValidator.cc | 8 ++------ tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/runtimes/neurun/src/backend/acl_cl/StageGenerator.cc b/runtimes/neurun/src/backend/acl_cl/StageGenerator.cc index d3eaf02..af68e78 100644 --- a/runtimes/neurun/src/backend/acl_cl/StageGenerator.cc +++ b/runtimes/neurun/src/backend/acl_cl/StageGenerator.cc @@ -657,8 +657,6 @@ void StageGenerator::visit(const model::operation::SoftmaxNode &node) const auto input_index{node.getInputs().at(model::operation::SoftmaxNode::Input::INPUT)}; const auto scale_index{node.param().scale_index}; - assert(_ctx.at(scale_index).shape().rank() == 0); - struct Param { model::operand::Index output_index; diff --git a/runtimes/neurun/src/compiler/OperationValidator.cc b/runtimes/neurun/src/compiler/OperationValidator.cc index 4652ce2..d31a1c0 100644 --- a/runtimes/neurun/src/compiler/OperationValidator.cc +++ b/runtimes/neurun/src/compiler/OperationValidator.cc @@ -66,14 +66,10 @@ void OperationValidator::visit(const model::operation::SoftmaxNode &node) const auto output_index{node.getOutputs().at(0)}; const auto input_index{node.getInputs().at(0)}; + const auto scale_index{node.param().scale_index}; assert(_ctx.at(output_index).shape().rank() == _ctx.at(input_index).shape().rank()); - - // TODO Support 'feature map' input - assert(_ctx.at(input_index).shape().rank() == 2); - assert(_ctx.at(input_index).shape().dim(0) == 1); - assert(_ctx.at(input_index).shape().dim(0) == _ctx.at(output_index).shape().dim(0)); - assert(_ctx.at(input_index).shape().dim(1) == _ctx.at(output_index).shape().dim(1)); + assert(_ctx.at(scale_index).shape().rank() == 0); } void OperationValidator::visit(const model::operation::PermuteNode &node) diff --git a/tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun b/tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun index 35ce699..4436e03 100644 --- a/tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun +++ b/tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun @@ -67,7 +67,6 @@ GeneratedTests.topk_v2* # Unhandled exception GeneratedTests.fully_connected* # Unexpected result -GeneratedTests.softmax* GeneratedTests.split* GeneratedTests.transpose_conv* GeneratedTests.pack* -- 2.7.4