[logo] Constant folding skips TensorBroadcast (#7847)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Fri, 11 Oct 2019 06:33:07 +0000 (15:33 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Fri, 11 Oct 2019 06:33:07 +0000 (15:33 +0900)
* [logo] Constant folding skips TensorBroadcast

TensorBroadcast is a good hint for optimizaiton. Let's skip this for
constant folding.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
* Add TODO comment

compiler/logo/src/Passes/ConstantFoldingPass.cpp

index c31b3c9..e038e71 100644 (file)
@@ -61,6 +61,10 @@ bool skip(const loco::Node *node)
 
       // We don't perform constant folding for Push
       static_cast<uint32_t>(loco::CanonicalOpcode::Push),
+
+      // TensorBroadcast is a good hint for optimization
+      // TODO Let this option be controlled by driver using logo
+      static_cast<uint32_t>(loco::CanonicalOpcode::TensorBroadcast),
   };
 
   if (node->dialect() == loco::CanonicalDialect::get())