Skip to content

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 force-pushed the tunip-entry-point branch from 6692151 to 2cab720 Compare August 16, 2022 21:36
@yelite yelite marked this pull request as ready for review August 16, 2022 21:36
@yelite yelite force-pushed the tunip-entry-point branch from 2cab720 to 37e125e Compare August 18, 2022 19:33
#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