Imported Upstream version 1.25.0
[platform/core/ml/nnfw.git] / runtime / onert / core / src / dumper / dot / DotDumper.cc
index 0bb2fa1..ab77a6c 100644 (file)
@@ -98,10 +98,10 @@ generate_dot_operations(const ir::Graph &graph,
 {
   ir::OperationIndexMap<std::unique_ptr<Operation>> dot_operations;
   const auto &operations = graph.operations();
-  operations.iterate([&](const ir::OperationIndex &index, const ir::Operation &op) {
+  operations.iterate([&](const ir::OperationIndex &index, const ir::IOperation &op) {
     auto node = std::make_unique<Operation>(index, op);
 
-    for (auto input : op.getInputs())
+    for (auto &&input : op.getInputs())
     {
       using onert::dumper::dot::Operand;
 
@@ -113,7 +113,7 @@ generate_dot_operations(const ir::Graph &graph,
       input_node->addOutEdge(node.get());
     }
 
-    for (auto output : op.getOutputs() | ir::Remove::UNDEFINED)
+    for (auto &&output : op.getOutputs() | ir::Remove::UNDEFINED)
     {
       using onert::dumper::dot::Operand;
       auto &output_node = dot_operands.at(output);
@@ -126,7 +126,7 @@ generate_dot_operations(const ir::Graph &graph,
   return dot_operations;
 }
 
-void update_lower_info(const compiler::LoweredGraph &lowered_graph,
+void update_lower_info(const compiler::ILoweredGraph &lowered_graph,
                        ir::OperandIndexMap<std::unique_ptr<Operand>> *dot_operands)
 {
   const auto &operands = lowered_graph.graph().operands();
@@ -153,11 +153,11 @@ void update_lower_info(const compiler::LoweredGraph &lowered_graph,
   });
 }
 
-void update_lower_info(const compiler::LoweredGraph &lowered_graph,
+void update_lower_info(const compiler::ILoweredGraph &lowered_graph,
                        ir::OperationIndexMap<std::unique_ptr<Operation>> *dot_operations)
 {
   const auto &operations = lowered_graph.graph().operations();
-  operations.iterate([&](const ir::OperationIndex &index, const ir::Operation &) {
+  operations.iterate([&](const ir::OperationIndex &index, const ir::IOperation &) {
     const auto lower_info = lowered_graph.lower_info().operation.getRawPtr(index);
     if (lower_info)
     {
@@ -213,7 +213,8 @@ void DotDumper::dump(const ir::Graph &graph, const std::string &tag)
   dump_to_file(dot_operands, dot_operations, tag);
 }
 
-void DotDumper::dump(const compiler::LoweredGraph &lowered_graph, const std::string &tag)
+// TODO Support derivative tensors
+void DotDumper::dump(const compiler::ILoweredGraph &lowered_graph, const std::string &tag)
 {
   if (_level == Level::OFF)
   {