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

Show types in VisualizeTree (#1733)

* show types in visualize_tree

* fix a warning

* address Bob's feedback
parent 4c15371e
......@@ -103,7 +103,7 @@ std::string pass::VisualizeTree::get_attributes(shared_ptr<Node> node)
ss << " label=\"" << node->get_name();
static const auto nvtos = std::getenv("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES");
static const char* nvtos = std::getenv("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES");
if (nvtos != nullptr)
{
// The shapes of the Outputs of a multi-output op
......@@ -112,6 +112,15 @@ std::string pass::VisualizeTree::get_attributes(shared_ptr<Node> node)
: vector_to_string(node->get_shape()));
}
static const char* nvtot = std::getenv("NGRAPH_VISUALIZE_TREE_OUTPUT_TYPES");
if (nvtot != nullptr)
{
// The types 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]")
: node->get_element_type().c_type_string());
}
const Node& n = *node;
auto eh = m_ops_to_details.find(TI(n));
if (eh != m_ops_to_details.end())
......
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