Commit 2e1823fe authored by Nick Korovaiko's avatar Nick Korovaiko Committed by Robert Kimball

Fix a segfault while printing shapes for multi-output ops in VisualizeTree (#677)

* fix a segfault while printing shapes for multi-output ops
parent 7697a85d
...@@ -103,7 +103,10 @@ std::string pass::VisualizeTree::get_attributes(shared_ptr<Node> node) ...@@ -103,7 +103,10 @@ std::string pass::VisualizeTree::get_attributes(shared_ptr<Node> node)
if (std::getenv("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES") != nullptr) if (std::getenv("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES") != nullptr)
{ {
ss << " " << vector_to_string(node->get_shape()); // The shapes of the Outputs of a multi-output op
// will be printed for its corresponding `GetOutputElement`s
ss << " " << (node->get_outputs().size() != 1 ? std::string("[skipped]")
: vector_to_string(node->get_shape()));
} }
ss << " \"]\n"; ss << " \"]\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment