[jit] Pretty printer improvements#12179
[jit] Pretty printer improvements#12179driazati wants to merge 4 commits intopytorch:masterfrom driazati:pret_improvements
Conversation
* Replaces `prim::PythonOp` with the name of the function being called * Delays printing values used in `prim::Return` nodes until the return node itself if that is the only place the value is used to remove some useless assigns
facebook-github-bot
left a comment
There was a problem hiding this comment.
driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
zdevito
left a comment
There was a problem hiding this comment.
Looks good. I have minor nits.
| printValueList(out, node->inputs()); | ||
|
|
||
| out << "\n"; | ||
| if (!is_resolving) { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| printIf(out, node, level); | ||
| break; | ||
| default: | ||
| if (!is_resolving && nodeOnlyOutputReturns(node)) { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| std::unordered_map<const Value*, std::string> value_names_; | ||
|
|
||
| // Nodes that were skipped to be printed later | ||
| std::unordered_set<const Node*> unresolved_nodes_; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
There was a problem hiding this comment.
driazati is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
prim::PythonOpwith the name of the function being calledprim::Returnnodes until the returnnode itself if that is the only place the value is used to remove some
useless assigns
@zdevito @apaszke @ezyang