From f2b2cdf0965073f6e5eb295debd98470ff9caaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?UTF-8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 5 Sep 2019 17:02:19 +0900 Subject: [moco-tf] Skip FuseBinaryIntoPreceding on Scalar (#7219) The current implementation of FuseBinaryIntoPreceding gets stuck when it encounters scalar constants. Let's make FuseBinaryIntoPreceding skip on this case. Signed-off-by: Jonghyun Park --- compiler/moco-tf/src/Transforms/FuseBinaryIntoPreceding.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler') diff --git a/compiler/moco-tf/src/Transforms/FuseBinaryIntoPreceding.cpp b/compiler/moco-tf/src/Transforms/FuseBinaryIntoPreceding.cpp index 083bc2f63..bfaf910b4 100644 --- a/compiler/moco-tf/src/Transforms/FuseBinaryIntoPreceding.cpp +++ b/compiler/moco-tf/src/Transforms/FuseBinaryIntoPreceding.cpp @@ -453,6 +453,11 @@ bool fuse_to_preceding(loco::Graph *graph, moco::tf::TFAdd *node) } // TODO do something when rank() is 0 + if (addparam_shape.rank() == 0) + { + // Not supported yet + return false; + } assert(addparam_shape.rank() != 0); // TODO support FullyConnected -- cgit v1.2.3