Commit 86a99474 authored by Adam Procter's avatar Adam Procter Committed by Scott Cyphers

Tweaks to VisualizeTree to make it tractable to render complex training graphs (#2864)

* Some hacks for graph visualization

* More betterer

* Remove debug prints

* Cheap temporary hack to deal with zombie users issue

* Less hacky fix for the zombie users issue

* Change to use get_name instead of get_friendly_name; misc. cleanup of dot output

* Allow '.dot' as VisualizeTree output format, and make it default

* Cleanup, and some documentation of this jump distance nonsense

* Comment edits

* Another comment edit

* Fix typo

* Remove reverse_topological_sort function (it's not needed)
parent 4d6fcc78
......@@ -160,19 +160,18 @@ void pass::Manager::run_passes(shared_ptr<Function> func, bool transitive)
std::string index_str = std::to_string(index);
index_str = std::string(num_digits_in_pass_index - index_str.length(), '0') + index_str;
auto base_filename = f_array.at(0)->get_name() + std::string("_") + index_str +
std::string("_") + m_pass_names.at(index) + std::string(".");
std::string("_") + m_pass_names.at(index);
if (m_visualize)
{
pass::VisualizeTree vt(base_filename + pass::VisualizeTree::get_file_ext());
pass::VisualizeTree vt(base_filename);
vt.set_ops_to_details(get_state().get_visualize_tree_ops_map());
vt.run_on_module(f_array);
}
if (m_serialize)
{
// no "." in the extension
pass::Serialization st(base_filename + "json");
pass::Serialization st(base_filename + ".json");
st.run_on_module(f_array);
}
}
......
This diff is collapsed.
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