[neurun] Rename operation name getter (#8857)
author이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Fri, 8 Nov 2019 06:42:52 +0000 (15:42 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 8 Nov 2019 06:42:52 +0000 (15:42 +0900)
Rename operation name getter to `name` from `getName`.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
72 files changed:
runtime/neurun/core/include/model/Operation.h
runtime/neurun/core/include/model/Subgraph.h
runtime/neurun/core/include/model/operation/Abs.h
runtime/neurun/core/include/model/operation/Add.h
runtime/neurun/core/include/model/operation/ArgMax.h
runtime/neurun/core/include/model/operation/AvgPool2D.h
runtime/neurun/core/include/model/operation/BatchToSpaceND.h
runtime/neurun/core/include/model/operation/Cast.h
runtime/neurun/core/include/model/operation/Comparison.h
runtime/neurun/core/include/model/operation/Concat.h
runtime/neurun/core/include/model/operation/Conv2D.h
runtime/neurun/core/include/model/operation/Custom.h
runtime/neurun/core/include/model/operation/DepthToSpace.h
runtime/neurun/core/include/model/operation/DepthwiseConv2D.h
runtime/neurun/core/include/model/operation/Dequantize.h
runtime/neurun/core/include/model/operation/Div.h
runtime/neurun/core/include/model/operation/EmbeddingLookup.h
runtime/neurun/core/include/model/operation/Exp.h
runtime/neurun/core/include/model/operation/Floor.h
runtime/neurun/core/include/model/operation/FullyConnected.h
runtime/neurun/core/include/model/operation/Gather.h
runtime/neurun/core/include/model/operation/HashtableLookup.h
runtime/neurun/core/include/model/operation/InstanceNorm.h
runtime/neurun/core/include/model/operation/L2Normalization.h
runtime/neurun/core/include/model/operation/L2Pool2D.h
runtime/neurun/core/include/model/operation/LSTM.h
runtime/neurun/core/include/model/operation/LocalResponseNormalization.h
runtime/neurun/core/include/model/operation/LogicalAnd.h
runtime/neurun/core/include/model/operation/LogicalNot.h
runtime/neurun/core/include/model/operation/LogicalOr.h
runtime/neurun/core/include/model/operation/Logistic.h
runtime/neurun/core/include/model/operation/MaxPool2D.h
runtime/neurun/core/include/model/operation/Mean.h
runtime/neurun/core/include/model/operation/Mul.h
runtime/neurun/core/include/model/operation/Neg.h
runtime/neurun/core/include/model/operation/PReLU.h
runtime/neurun/core/include/model/operation/Pack.h
runtime/neurun/core/include/model/operation/Pad.h
runtime/neurun/core/include/model/operation/Permute.h
runtime/neurun/core/include/model/operation/RNN.h
runtime/neurun/core/include/model/operation/RSQRT.h
runtime/neurun/core/include/model/operation/ReLU.h
runtime/neurun/core/include/model/operation/ReLU1.h
runtime/neurun/core/include/model/operation/ReLU6.h
runtime/neurun/core/include/model/operation/ReduceMax.h
runtime/neurun/core/include/model/operation/ReduceMin.h
runtime/neurun/core/include/model/operation/ReduceSum.h
runtime/neurun/core/include/model/operation/Reshape.h
runtime/neurun/core/include/model/operation/ResizeBilinear.h
runtime/neurun/core/include/model/operation/SQRT.h
runtime/neurun/core/include/model/operation/Softmax.h
runtime/neurun/core/include/model/operation/SpaceToBatchND.h
runtime/neurun/core/include/model/operation/SpaceToDepth.h
runtime/neurun/core/include/model/operation/Split.h
runtime/neurun/core/include/model/operation/SquaredDifference.h
runtime/neurun/core/include/model/operation/Squeeze.h
runtime/neurun/core/include/model/operation/StridedSlice.h
runtime/neurun/core/include/model/operation/Sub.h
runtime/neurun/core/include/model/operation/Tanh.h
runtime/neurun/core/include/model/operation/TopKV2.h
runtime/neurun/core/include/model/operation/Transpose.h
runtime/neurun/core/include/model/operation/TransposeConv.h
runtime/neurun/core/include/model/operation/Unpack.h
runtime/neurun/core/src/compiler/HEScheduler.cc
runtime/neurun/core/src/dumper/dot/OperationNode.cc
runtime/neurun/core/src/exec/DataflowExecutor.cc
runtime/neurun/core/src/exec/ExecutionObservers.cc
runtime/neurun/core/src/exec/interp/Interpreter.cc
runtime/neurun/core/src/graph/Graph.cc
runtime/neurun/core/src/model/Subgraph.cc
runtime/neurun/core/src/model/operation/Custom.cc
runtime/neurun/test/graph/MockNode.h

index 029684d..76a72cb 100644 (file)
@@ -65,7 +65,7 @@ public:
 
 public:
   virtual void accept(OperationVisitor &v) const = 0;
-  virtual std::string getName() const = 0;
+  virtual std::string name() const = 0;
 
 public:
   void replaceInput(const OperandIndex &from, const OperandIndex &to);
index 2fbf7b3..bf3f059 100644 (file)
@@ -53,7 +53,7 @@ public:
 public:
   void accept(OperationVisitor &v) const override;
 
-  virtual std::string getName(void) const override { return "Subgraph"; }
+  virtual std::string name(void) const override { return "Subgraph"; }
 
 public:
   void appendOperation(const OperationIndex &index, const Operation &node)
index 34d2df4..40f635f 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Abs"; }
+  std::string name() const override { return "Abs"; }
 };
 
 } // namespace operation
index a201895..fc3403d 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Add"; }
+  std::string name() const override { return "Add"; }
 
 public:
   const Param &param() const { return _param; }
index 14f772d..b9ad508 100644 (file)
@@ -45,7 +45,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ArgMax"; }
+  std::string name() const override { return "ArgMax"; }
 
 public:
   const Param &param() const { return _param; }
index d816f26..860b019 100644 (file)
@@ -53,7 +53,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "AvgPool2D"; }
+  std::string name() const override { return "AvgPool2D"; }
 
 public:
   const Param &param() const { return _param; }
index b7443d6..80e9488 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "BatchToSpaceND"; }
+  std::string name() const override { return "BatchToSpaceND"; }
 };
 
 } // namespace operation
index 2942cb9..215da97 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Cast"; }
+  std::string name() const override { return "Cast"; }
 };
 
 } // namespace operation
index 32536ed..57d1f07 100644 (file)
@@ -56,7 +56,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Comparison"; }
+  std::string name() const override { return "Comparison"; }
 
 public:
   const Param &param() const { return _param; }
index 03c8607..44b93f3 100644 (file)
@@ -42,7 +42,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Concat"; }
+  std::string name() const override { return "Concat"; }
 
 public:
   const Param &param() const { return _param; }
index 0e6f929..1a54342 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Conv2D"; }
+  std::string name() const override { return "Conv2D"; }
 
 public:
   const Param &param() const { return _param; }
index 60c873e..6bab1f7 100644 (file)
@@ -45,7 +45,7 @@ public:
    */
   const std::string &id() const;
 
-  std::string getName() const override;
+  std::string name() const override;
 
   /**
    * @return user-provided data
index 88feb1f..57c8343 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "DepthToSpace"; }
+  std::string name() const override { return "DepthToSpace"; }
 
 public:
   const Param &param() const { return _param; }
index d9badfb..4d135bc 100644 (file)
@@ -53,7 +53,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "DepthwiseConv2D"; }
+  std::string name() const override { return "DepthwiseConv2D"; }
 
 public:
   const Param &param() const { return _param; }
index 4e6a941..9ab7b4c 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Dequantize"; }
+  std::string name() const override { return "Dequantize"; }
 };
 
 } // namespace operation
index b4c7089..5e17a6f 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Div"; }
+  std::string name() const override { return "Div"; }
 
 public:
   const Param &param() const { return _param; }
index 1b83946..732d1b7 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "EmbeddingLookup"; }
+  std::string name() const override { return "EmbeddingLookup"; }
 };
 
 } // namespace operation
index 618564b..077c57a 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Exp"; }
+  std::string name() const override { return "Exp"; }
 };
 
 } // namespace operation
index d26cdf0..83b851a 100644 (file)
@@ -41,7 +41,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Floor"; }
+  std::string name() const override { return "Floor"; }
 };
 
 } // namespace operation
index 18ab521..285cfb5 100644 (file)
@@ -50,7 +50,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "FullyConnected"; }
+  std::string name() const override { return "FullyConnected"; }
 
 public:
   const Param &param() const { return _param; }
index 42c313d..0f19157 100644 (file)
@@ -48,7 +48,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Gather"; }
+  std::string name() const override { return "Gather"; }
 
 public:
   const Param &param() const { return _param; }
index 3c7d72d..a8f5606 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "HashTableLookup"; }
+  std::string name() const override { return "HashTableLookup"; }
 };
 
 } // namespace operation
index 882848d..2370b61 100644 (file)
@@ -49,7 +49,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "InstanceNorm"; }
+  std::string name() const override { return "InstanceNorm"; }
 
 public:
   const Param &param() const { return _param; }
index 0f2ec4d..b51336b 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "L2Normalization"; }
+  std::string name() const override { return "L2Normalization"; }
 };
 
 } // namespace operation
index c29899a..50d2e21 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "L2Pool2D"; }
+  std::string name() const override { return "L2Pool2D"; }
 
 public:
   const Param &param() const { return _param; }
index 719179e..e97fe12 100644 (file)
@@ -73,7 +73,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "LSTM"; }
+  std::string name() const override { return "LSTM"; }
 
 public:
   const Param &param() const { return _param; }
index a50fcbe..a906316 100644 (file)
@@ -50,7 +50,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "LocalResponseNormalization"; }
+  std::string name() const override { return "LocalResponseNormalization"; }
 
 public:
   const Param &param() const { return _param; }
index dd19ed9..ce7b8da 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "LogicalAnd"; }
+  std::string name() const override { return "LogicalAnd"; }
 };
 
 } // namespace operation
index c2fa8f0..301edd8 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "LogicalNot"; }
+  std::string name() const override { return "LogicalNot"; }
 };
 
 } // namespace operation
index 375992e..a15ae97 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "LogicalOr"; }
+  std::string name() const override { return "LogicalOr"; }
 };
 
 } // namespace operation
index 7dccdcc..68cd1aa 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Logistic"; }
+  std::string name() const override { return "Logistic"; }
 };
 
 } // namespace operation
index 4fbe0e8..4388788 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "MaxPool2D"; }
+  std::string name() const override { return "MaxPool2D"; }
 
 public:
   const Param &param() const { return _param; }
index cbff27f..22c2e50 100644 (file)
@@ -45,7 +45,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Mean"; }
+  std::string name() const override { return "Mean"; }
 
 public:
   const Param &param() const { return _param; }
index 0ba9e3f..0675988 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Mul"; }
+  std::string name() const override { return "Mul"; }
 
 public:
   const Param &param() const { return _param; }
index 47cbf5d..401414d 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Neg"; }
+  std::string name() const override { return "Neg"; }
 };
 
 } // namespace operation
index a2a7f94..76a76ac 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "PReLU"; }
+  std::string name() const override { return "PReLU"; }
 };
 
 } // namespace operation
index 4071461..ce7ff7f 100644 (file)
@@ -38,7 +38,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Pack"; }
+  std::string name() const override { return "Pack"; }
 
 public:
   const Param &param() const { return _param; }
index 0cea11d..7594098 100644 (file)
@@ -41,7 +41,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Pad"; }
+  std::string name() const override { return "Pad"; }
 };
 
 } // namespace operation
index 983bb63..2ba4665 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Permute"; }
+  std::string name() const override { return "Permute"; }
 
 public:
   Permute(const OperandIndex &input, const OperandIndex &output,
index 7ad000b..1b7ec89 100644 (file)
@@ -54,7 +54,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "RNN"; }
+  std::string name() const override { return "RNN"; }
 
 public:
   const Param &param() const { return _param; }
index a5d2615..243fe94 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "RSQRT"; }
+  std::string name() const override { return "RSQRT"; }
 };
 
 } // namespace operation
index 64dba60..6d7cbd5 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ReLU"; }
+  std::string name() const override { return "ReLU"; }
 };
 
 } // namespace operation
index eb83dc2..b28bab1 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ReLU1"; }
+  std::string name() const override { return "ReLU1"; }
 };
 
 } // namespace operation
index ccff13c..9bf9eb1 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ReLU6"; }
+  std::string name() const override { return "ReLU6"; }
 };
 
 } // namespace operation
index 4c0586d..bb52fcb 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ReduceMax"; }
+  std::string name() const override { return "ReduceMax"; }
 
 public:
   const Param &param() const { return _param; }
index 3393c54..7bbeb88 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ReduceMin"; }
+  std::string name() const override { return "ReduceMin"; }
 
 public:
   const Param &param() const { return _param; }
index 3faffd7..f3162d6 100644 (file)
@@ -45,7 +45,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ReduceSum"; }
+  std::string name() const override { return "ReduceSum"; }
 
 public:
   const Param &param() const { return _param; }
index 64359cd..d32789e 100644 (file)
@@ -41,7 +41,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Reshape"; }
+  std::string name() const override { return "Reshape"; }
 };
 
 } // namespace operation
index 9736738..685d1e1 100644 (file)
@@ -48,7 +48,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "ResizeBilinear"; }
+  std::string name() const override { return "ResizeBilinear"; }
 
 public:
   const Param &param() const { return _param; }
index 3192d0d..bd97397 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "SQRT"; }
+  std::string name() const override { return "SQRT"; }
 };
 
 } // namespace operation
index 097776f..af4fc99 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "SoftMax"; }
+  std::string name() const override { return "SoftMax"; }
 
 public:
   const Param &param() const { return _param; }
index bb1faee..63ed2c7 100644 (file)
@@ -43,7 +43,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "SpaceToBatchND"; }
+  std::string name() const override { return "SpaceToBatchND"; }
 };
 
 } // namespace operation
index a7e9ece..c28517b 100644 (file)
@@ -47,7 +47,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "SpaceToDepth"; }
+  std::string name() const override { return "SpaceToDepth"; }
 
 public:
   const Param &param() const { return _param; }
index 2a1d61e..1ff2d81 100644 (file)
@@ -44,7 +44,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Split"; }
+  std::string name() const override { return "Split"; }
 
 public:
   const Param &param() const { return _param; }
index 16cc052..85ccb47 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "SquaredDifference"; }
+  std::string name() const override { return "SquaredDifference"; }
 };
 
 } // namespace operation
index 84966e2..0d2a238 100644 (file)
@@ -48,7 +48,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Squeeze"; }
+  std::string name() const override { return "Squeeze"; }
   const Param &param() const { return _param; }
 
 private:
index f408982..e090e49 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "StridedSlice"; }
+  std::string name() const override { return "StridedSlice"; }
 
 public:
   const Param &param() const { return _param; }
index 697ed05..6fc4b92 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Sub"; }
+  std::string name() const override { return "Sub"; }
 
 public:
   const Param &param() const { return _param; }
index 888a0a9..313c6b7 100644 (file)
@@ -39,7 +39,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Tanh"; }
+  std::string name() const override { return "Tanh"; }
 };
 
 } // namespace operation
index 1694184..aa494b9 100644 (file)
@@ -53,7 +53,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "TopKV2"; }
+  std::string name() const override { return "TopKV2"; }
 
 public:
   const Param &param() const { return _param; }
index 8a568af..ff32686 100644 (file)
@@ -50,7 +50,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Transpose"; }
+  std::string name() const override { return "Transpose"; }
 
 public:
   const Param &param() const { return _param; }
index fa922d6..b59df06 100644 (file)
@@ -51,7 +51,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "TransposeConv"; }
+  std::string name() const override { return "TransposeConv"; }
 
 public:
   const Param &param() const { return _param; }
index 790b261..a1ece87 100644 (file)
@@ -44,7 +44,7 @@ public:
 
 public:
   void accept(OperationVisitor &v) const override;
-  std::string getName() const override { return "Unpack"; }
+  std::string name() const override { return "Unpack"; }
 
 public:
   const Param &param() const { return _param; }
index 4dcca0e..00b4348 100644 (file)
@@ -68,7 +68,7 @@ static bool isWorkaroundSkip(const graph::Graph &graph, const backend::Backend *
       Adding exception in stage doesn't help. Because if there is a record for add without
       broadcast, scheduling will select it since it doesn't distinguish broadcast and
       non-broadcast like it does for quant non-quantized*/
-  if (backend->config()->id() == "cpu" && node.getName() == "Add")
+  if (backend->config()->id() == "cpu" && node.name() == "Add")
   {
     const auto lhs_index{node.getInputs().at(model::operation::Add::Input::LHS)};
     const auto rhs_index{node.getInputs().at(model::operation::Add::Input::RHS)};
@@ -86,7 +86,7 @@ static bool isWorkaroundSkip(const graph::Graph &graph, const backend::Backend *
           Adding exception in stage doesn't help. Because if there is a record for Mul without
           broadcast, scheduling will select it since it doesn't distinguish broadcast and
           non-broadcast like it does for quant non-quantized*/
-  else if (backend->config()->id() == "acl_neon" && node.getName() == "Mul")
+  else if (backend->config()->id() == "acl_neon" && node.name() == "Mul")
   {
     const auto lhs_index{node.getInputs().at(model::operation::Mul::Input::LHS)};
     const auto rhs_index{node.getInputs().at(model::operation::Mul::Input::RHS)};
@@ -155,7 +155,7 @@ void HEScheduler::scheduleShufflingBackends()
         continue;
       }
       const auto exec_time =
-          _exec_time->getOperationExecTime(_all_backends[backend_ind], node.getName(), quant, size);
+          _exec_time->getOperationExecTime(_all_backends[backend_ind], node.name(), quant, size);
       // Scheduling to measure data transfer must be done after measuring all backends separately
       assert(exec_time != _exec_time->NOT_FOUND);
       if (exec_time == _exec_time->getMax())
@@ -164,7 +164,7 @@ void HEScheduler::scheduleShufflingBackends()
         continue;
       }
       _backend_resolver->setBackend(rank.second, _all_backends[backend_ind]);
-      VERBOSE(HEScheduler::schedule) << "backend for " << node.getName() << " is "
+      VERBOSE(HEScheduler::schedule) << "backend for " << node.name() << " is "
                                      << _all_backends[backend_ind]->config()->id() << std::endl;
       ++backend_ind;
       break;
@@ -178,7 +178,7 @@ bool HEScheduler::isNodeProfiled(const model::Operation &node)
   const auto size = getOperationsFlattenedIOSize(*_graph, node);
   for (const auto *backend : _all_backends)
   {
-    const auto exec_time = _exec_time->getOperationExecTime(backend, node.getName(), quant, size);
+    const auto exec_time = _exec_time->getOperationExecTime(backend, node.name(), quant, size);
     if (exec_time == _exec_time->NOT_FOUND)
       return false;
   }
@@ -294,32 +294,32 @@ int64_t HEScheduler::tryBackend(const model::Operation &node, const backend::Bac
   if (!util::getConfigBool(util::config::PROFILING_MODE))
   {
     VERBOSE(HEScheduler::tryBackend)
-        << "Trying to HE schedule while there is no profiling info for " << node.getName()
+        << "Trying to HE schedule while there is no profiling info for " << node.name()
         << " on backend " << backend->config()->id() << ". So this backend won't be used. "
         << std::endl;
-    _is_supported[backend][node.getName()] = false;
+    _is_supported[backend][node.name()] = false;
     return _exec_time->getMax();
   }
   auto iter = _is_supported.find(backend);
   if (iter != _is_supported.end())
   {
-    auto it2 = iter->second.find(node.getName());
+    auto it2 = iter->second.find(node.name());
     if (it2 != iter->second.end())
     {
-      return _is_supported[backend][node.getName()] ? 1 : _exec_time->getMax();
+      return _is_supported[backend][node.name()] ? 1 : _exec_time->getMax();
     }
   }
   try
   {
     _backend_resolver->getBackendContext(backend)->shape_fixer->fix(node);
 
-    _is_supported[backend][node.getName()] = true;
+    _is_supported[backend][node.name()] = true;
   }
   catch (std::runtime_error &e)
   {
-    _is_supported[backend][node.getName()] = false;
+    _is_supported[backend][node.name()] = false;
   }
-  return _is_supported[backend][node.getName()] ? 1 : _exec_time->getMax();
+  return _is_supported[backend][node.name()] ? 1 : _exec_time->getMax();
 }
 
 void HEScheduler::makeRank()
@@ -354,7 +354,7 @@ int64_t HEScheduler::DFSMaxRank(const model::OperationIndex &index)
   // get average exec time of this op
   for (const auto &backend : _all_backends)
   {
-    auto exec_time = _exec_time->getOperationExecTime(backend, node.getName(), quant, size);
+    auto exec_time = _exec_time->getOperationExecTime(backend, node.name(), quant, size);
     if (exec_time == _exec_time->NOT_FOUND)
     {
       exec_time = tryBackend(node, backend);
@@ -371,7 +371,7 @@ int64_t HEScheduler::DFSMaxRank(const model::OperationIndex &index)
   }
   if (supported_backends_quantity == 0)
   {
-    throw std::runtime_error{"Encountered unsupported op: " + node.getName()};
+    throw std::runtime_error{"Encountered unsupported op: " + node.name()};
   }
   rank /= supported_backends_quantity;
 
@@ -379,7 +379,7 @@ int64_t HEScheduler::DFSMaxRank(const model::OperationIndex &index)
   int64_t std = 0;
   for (const auto backend : _all_backends)
   {
-    const auto exec_time = getOpTime(backend, node.getName(), quant, size);
+    const auto exec_time = getOpTime(backend, node.name(), quant, size);
     if (exec_time < _exec_time->getMax())
     {
       std += (exec_time - rank) * (exec_time - rank);
@@ -396,8 +396,8 @@ int64_t HEScheduler::DFSMaxRank(const model::OperationIndex &index)
   assert(rank >= 0);
   _rank_to_op.emplace(rank, index);
   _op_to_rank->emplace(index, rank);
-  VERBOSE(HEScheduler::DFSMaxRank) << "rank of operation (" << index.value() << ")"
-                                   << node.getName() << " is " << rank << std::endl;
+  VERBOSE(HEScheduler::DFSMaxRank) << "rank of operation (" << index.value() << ")" << node.name()
+                                   << " is " << rank << std::endl;
 
   return rank;
 }
@@ -501,7 +501,7 @@ bool HEScheduler::schedule(const model::OperationIndex &index,
   _backends_avail_time[chosen_backend].emplace(eft, eft - selected_exec_time);
   _backend_resolver->setBackend(index, chosen_backend);
 
-  VERBOSE(HEScheduler::schedule) << "backend for " << node.getName() << " is "
+  VERBOSE(HEScheduler::schedule) << "backend for " << node.name() << " is "
                                  << chosen_backend->config()->id() << ". Its eft: " << eft
                                  << std::endl;
   return true;
@@ -535,7 +535,7 @@ HEScheduler::ESTAndExecTime(const backend::Backend *backend, const model::Operat
     return {_exec_time->getMax(), _exec_time->getMax()};
   }
   // get average exec time of the op on this backend
-  auto exec_time = getOpTime(backend, node.getName(), quant, size);
+  auto exec_time = getOpTime(backend, node.name(), quant, size);
   if (backend->config()->id() == "cpu" && is_parallel_exec)
   {
     exec_time *= CPU_DELAY;
@@ -585,15 +585,15 @@ HEScheduler::ESTAndExecTime(const backend::Backend *backend, const model::Operat
   if (!is_parallel_exec)
   {
     VERBOSE(HEScheduler::ESTAndExecTime)
-        << "exec_time of (" << index.value() << ") " << node.getName() << " quant==" << quant
-        << " on " << backend->config()->id() << " is " << exec_time
+        << "exec_time of (" << index.value() << ") " << node.name() << " quant==" << quant << " on "
+        << backend->config()->id() << " is " << exec_time
         << " microseconds. Data transfer cost: " << total_transfer_cost << std::endl;
 
     return {total_transfer_cost, exec_time};
   }
   VERBOSE(HEScheduler::ESTAndExecTime)
-      << "exec_time of (" << index.value() << ") " << node.getName() << " quant==" << quant
-      << " on " << backend->config()->id() << ": " << exec_time
+      << "exec_time of (" << index.value() << ") " << node.name() << " quant==" << quant << " on "
+      << backend->config()->id() << ": " << exec_time
       << " microseconds. Backend available time: " << prev_op_ft
       << " Parent's max eft: " << max_pred_eft - total_transfer_cost
       << " data transfer cost: " << total_transfer_cost << std::endl;
index 34a7e77..bc3237b 100644 (file)
@@ -36,7 +36,7 @@ Operation::Operation(const neurun::model::OperationIndex &index,
                      const neurun::model::Operation &node)
     : Node{"operation" + std::to_string(index.value())}
 {
-  setAttribute("label", std::to_string(index.value()) + " : " + node.getName());
+  setAttribute("label", std::to_string(index.value()) + " : " + node.name());
   setAttribute("shape", OPERATION_SHAPE);
   setAttribute("colorscheme", BG_COLOR_SCHEME);
   setAttribute("fillcolor", DEFAULT_FILLCOLOR);
index 75d6161..028a038 100644 (file)
@@ -37,7 +37,7 @@ int64_t DataflowExecutor::calculateRank(const std::vector<model::Element> &opera
     auto it = _indexed_ranks->find(element.index);
     if (it == _indexed_ranks->end())
     {
-      assert(element.node->getName() == "Permute");
+      assert(element.node->name() == "Permute");
       // assign int32_t::max to prevent integer overflow
       rank += std::numeric_limits<int32_t>::max();
     }
index e6ffb93..0fa8a14 100644 (file)
@@ -41,7 +41,7 @@ void ProfileObserver::handleEnd(IExecutor *exec, const model::Operation *node,
   _timer->handleEnd();
   const auto timer_res = _timer->getTime();
 
-  auto node_name = node->getName();
+  auto node_name = node->name();
   VERBOSE(ProfileInfo) << "Time for " << node_name << " : " << timer_res << std::endl;
 
   // fill ExecTime:
index e173630..5eb59f0 100644 (file)
@@ -71,7 +71,7 @@ public:
 
   void execute(const model::OperationIndex &idx)
   {
-    const auto nodeName = _env->model().operations.at(idx).getName();
+    const auto nodeName = _env->model().operations.at(idx).name();
     VERBOSE(INTERPRETER) << "Prepare output operands and execute " << nodeName
                          << " operation (id: " << idx.value() << ")" << std::endl;
     _env->model().operations.at(idx).accept(*this);
@@ -165,7 +165,7 @@ void Interpreter::run()
       const auto current_operation_index = operation_stack.top();
       operation_stack.pop();
       VERBOSE(INTERPRETER) << "Poped operation: " << current_operation_index.value() << "("
-                           << _env->model().operations.at(current_operation_index).getName() << ")"
+                           << _env->model().operations.at(current_operation_index).name() << ")"
                            << std::endl;
 
       // execution
index a22226b..b3d70b1 100644 (file)
@@ -123,7 +123,7 @@ void Graph::lower(void)
         const auto &node_backend_id = _backend_resolver->getBackend(node_index)->config()->id();
         VERBOSE(Lower) << "SUBG#" << subg_index.value() << " { " << subg_backend_id << "("
                        << model::to_string(subg_backend_layout) << ") } "
-                       << " NODE#" << node_index.value() << " (" << node.getName() << ") { "
+                       << " NODE#" << node_index.value() << " (" << node.name() << ") { "
                        << node_backend_id << "(" << model::to_string(layout) << ") } " << std::endl;
         if (subg_backend_id != node_backend_id || subg_backend_layout != layout)
           return false;
@@ -152,8 +152,8 @@ void Graph::lower(void)
             if (node_outputs.contains(input))
             {
               VERBOSE(Lower) << "SUBG#" << subg_index.value() << " 's NODE#" << n_index.value()
-                             << "(" << n.getName() << ") is connected to NODE#"
-                             << node_index.value() << "(" << node.getName() << ")" << std::endl;
+                             << "(" << n.name() << ") is connected to NODE#" << node_index.value()
+                             << "(" << node.name() << ")" << std::endl;
               return true;
             }
           }
@@ -165,15 +165,15 @@ void Graph::lower(void)
             if (node_inputs.contains(output))
             {
               VERBOSE(Lower) << "SUBG#" << subg_index.value() << " 's NODE#" << n_index.value()
-                             << " (" << n.getName() << ") is connected to NODE#"
-                             << node_index.value() << std::endl;
+                             << " (" << n.name() << ") is connected to NODE#" << node_index.value()
+                             << std::endl;
               return true;
             }
           }
         }
 
         VERBOSE(Lower) << "SUBG#" << subg_index.value() << " is not connected to NODE#"
-                       << node_index.value() << "(" << node.getName() << ")" << std::endl;
+                       << node_index.value() << "(" << node.name() << ")" << std::endl;
       }
 
       return false;
@@ -253,7 +253,7 @@ void Graph::lower(void)
         lower_info->addDefPermuteFactor(operand::PermuteFactor{backend, backend_layout});
       }
 
-      if (node.getName() == "Split")
+      if (node.name() == "Split")
       {
         // Ideally this condition must be like 'node.getOutputs().size() > 1' but
         // this is true for HashtableLookup also. TODO: Come up with more clever solution
@@ -273,8 +273,7 @@ void Graph::lower(void)
         subg = &(_subgraphs->at(new_subg_index));
 
         VERBOSE(Lower) << "SUBG#" << subg_index.value() << " is created for "
-                       << "NODE#" << node_index.value() << "(" << node.getName() << ")"
-                       << std::endl;
+                       << "NODE#" << node_index.value() << "(" << node.name() << ")" << std::endl;
       }
       else
       {
@@ -282,8 +281,7 @@ void Graph::lower(void)
         subg->setInputs(node.getInputs());
 
         VERBOSE(Lower) << "SUBG#" << subg_index.value() << " merges "
-                       << "NODE#" << node_index.value() << "(" << node.getName() << ")"
-                       << std::endl;
+                       << "NODE#" << node_index.value() << "(" << node.name() << ")" << std::endl;
       }
 
       bool finish = false;
index f283279..e1028ad 100644 (file)
@@ -43,7 +43,7 @@ std::string Subgraph::getStr() const
   ss << " ) -> {";
   for (const auto &elem : _operations)
   {
-    ss << " " << elem.index.value() << "(" << elem.node->getName() << ")";
+    ss << " " << elem.index.value() << "(" << elem.node->name() << ")";
   }
   ss << " } -> OUT(";
   for (const auto &index : getOutputs())
index 223c60e..c3c5b3d 100644 (file)
@@ -39,7 +39,7 @@ const Custom::Userdata &Custom::userdata() const { return _userdata; }
 
 Custom::~Custom() { delete[] _userdata.data; }
 
-std::string Custom::getName() const { return id(); }
+std::string Custom::name() const { return id(); }
 
 } // namespace operation
 } // namespace model
index 3aa9763..b0b8b71 100644 (file)
@@ -38,7 +38,7 @@ public:
 
 public:
   void accept(neurun::model::OperationVisitor &) const override {}
-  std::string getName() const override { return "SimpleMock"; }
+  std::string name() const override { return "SimpleMock"; }
 };
 
 } // namespace graph