[neurun] Verbose exception message for Backends (#8901)
author이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Tue, 12 Nov 2019 09:55:01 +0000 (18:55 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 12 Nov 2019 09:55:01 +0000 (18:55 +0900)
ShapeFixer exception message shows that it is from which module and its
operation name.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtime/neurun/core/include/backend/IKernelGenerator.h
runtime/neurun/core/include/backend/IShapeFixer.h

index 6d49c25..42e4174 100644 (file)
@@ -45,10 +45,10 @@ public:
 protected:
   using model::OperationVisitor::visit;
 
-#define OP(InternalName)                                              \
-  virtual void visit(const model::operation::InternalName &) override \
-  {                                                                   \
-    throw std::runtime_error("NYI");                                  \
+#define OP(InternalName)                                                                \
+  virtual void visit(const model::operation::InternalName &) override                   \
+  {                                                                                     \
+    throw std::runtime_error("KernelGenerator: NYI for operation '" #InternalName "'"); \
   }
 #include "model/Operations.lst"
 #undef OP
index 8b1cc3d..579c639 100644 (file)
@@ -44,10 +44,10 @@ public:
   }
 
 protected:
-#define OP(InternalName)                                              \
-  virtual void visit(const model::operation::InternalName &) override \
-  {                                                                   \
-    throw std::runtime_error("NYI");                                  \
+#define OP(InternalName)                                                           \
+  virtual void visit(const model::operation::InternalName &) override              \
+  {                                                                                \
+    throw std::runtime_error("ShapeFixer: NYI for operation '" #InternalName "'"); \
   }
 #include "model/Operations.lst"
 #undef OP