[neurun] Remove asserts for SoftMax validation to support tensors (#4361)
author김수진/On-Device Lab(SR)/Engineer/삼성전자 <sjsujin.kim@samsung.com>
Wed, 30 Jan 2019 08:05:54 +0000 (17:05 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Wed, 30 Jan 2019 08:05:54 +0000 (17:05 +0900)
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 <sjsujin.kim@samsung.com>
runtimes/neurun/src/backend/acl_cl/StageGenerator.cc
runtimes/neurun/src/compiler/OperationValidator.cc
tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun

index d3eaf02..af68e78 100644 (file)
@@ -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;
index 4652ce2..d31a1c0 100644 (file)
@@ -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)
index 35ce699..4436e03 100644 (file)
@@ -67,7 +67,6 @@ GeneratedTests.topk_v2*
 # Unhandled exception
 GeneratedTests.fully_connected*
 # Unexpected result
-GeneratedTests.softmax*
 GeneratedTests.split*
 GeneratedTests.transpose_conv*
 GeneratedTests.pack*