summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>2019-09-17 01:47:46 (GMT)
committerGitHub Enterprise <noreply-CODE@samsung.com>2019-09-17 01:47:46 (GMT)
commit30eac57ca182f784a178894d42628a62afbbb41c (patch)
treef7a6d06144c34362dd4ad39e416842a256657a9a
parent3a5bf55117ae3a4e3755099ecc8f261b15a6e74d (diff)
downloadnnfw-30eac57ca182f784a178894d42628a62afbbb41c.zip
nnfw-30eac57ca182f784a178894d42628a62afbbb41c.tar.gz
nnfw-30eac57ca182f784a178894d42628a62afbbb41c.tar.bz2
[exo-tflite] Resolve TensorBroadcast for Mul (#7491)
This will add handler for TFLMul node in TensorBroadcastConverter Signed-off-by: SaeHie Park <saehie.park@samsung.com>
-rw-r--r--compiler/exo-tflite/src/Conversion/TensorBroadcastConverter.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/compiler/exo-tflite/src/Conversion/TensorBroadcastConverter.cpp b/compiler/exo-tflite/src/Conversion/TensorBroadcastConverter.cpp
index 1113c11..84f74a2 100644
--- a/compiler/exo-tflite/src/Conversion/TensorBroadcastConverter.cpp
+++ b/compiler/exo-tflite/src/Conversion/TensorBroadcastConverter.cpp
@@ -52,7 +52,14 @@ struct Collector final : public locoex::TFLNodeMutableVisitor<void>
// TODO ADD TFLDiv
- // TODO ADD TFLMul
+ void visit(locoex::TFLMul *node) final
+ {
+ if (auto tbc = input_as_tbc<locoex::TFLMul>(node))
+ {
+ NodePair pair(tbc, node);
+ candidates.insert(pair);
+ }
+ }
// TODO ADD TFLSub
@@ -127,7 +134,11 @@ bool TensorBroadcastConverter::run(loco::Graph *graph)
changed = true;
}
// TODO ADD TFLDiv
- // TODO ADD TFLMul
+ else if (auto tflmul = dynamic_cast<locoex::TFLMul *>(pair.second))
+ {
+ jump_connection<locoex::TFLMul>(tensorbroadcast, tflmul);
+ changed = true;
+ }
// TODO ADD TFLSub
else
{