Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TVMScript] Printer entry point #12462

Merged
merged 3 commits into from
Aug 21, 2022
Merged

Conversation

yelite
Copy link
Contributor

@yelite yelite commented Aug 16, 2022

This PR:

  • Adds an entry point for the TVMScript Unified Printer
  • Adds a helper object class RootNodeContainer to provide an injection point for the actual printer implementation to add specialized logic on the root node to print.

This PR is in draft state because it's branched off from a pending PR #12396

Tracking issue: #11912

cc @junrushao1994 @gbonik

@yelite yelite changed the title [TVMScript] Printer Entry Point [TVMScript] Printer entry point Aug 16, 2022
@yelite yelite marked this pull request as ready for review August 16, 2022 21:36
#include <tvm/node/object_path.h>

namespace tvm {
namespace script {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, what do you think works better, tvm::script::printer or tvm::script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the function name is Script, I think tvm::script::printer is a better choice. Otherwise the purpose of this function is less clear, because it's a free function rather than a method on IR node.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to the tvm::script::printer

@junrushao
Copy link
Member

Otherwise the PR looks nice to me!

@junrushao junrushao merged commit cc769fd into apache:main Aug 21, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
This PR:

- Adds an entry point for the TVMScript Unified Printer
- Adds a helper object class `RootNodeContainer` to provide an injection point for the actual printer implementation to add specialized logic on the root node to print.

Tracking issue: apache#11912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants