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] Introduce PrinterConfig #13831

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

junrushao
Copy link
Member

@junrushao junrushao commented Jan 24, 2023

This PR introduces PrinterConfig, a systematic way to configure
TVMScript printer without having to set global flags.

This PR enables more customization of printer behavior. More
specifically, now any TVM’s object in python, as long as it
inherits from Scriptable, it automatically gains two methods:

  • .script(tir_prefix=...)
  • .show(...)

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jan 24, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: tvmscript See #10317 for details

Generated by tvm-bot

@junrushao junrushao force-pushed the feature/2023-01-23/printer-config branch 6 times, most recently from f739f02 to d56de23 Compare January 24, 2023 06:35
@junrushao junrushao marked this pull request as ready for review January 24, 2023 06:35
@junrushao junrushao force-pushed the feature/2023-01-23/printer-config branch 2 times, most recently from f04cd31 to 1ceebbc Compare January 24, 2023 07:14
This PR introduces `PrinterConfig`, a systematic way to configure
TVMScript printer without having to set global flags.

This PR enables more customization of printer behavior. More
specifically, now any TVM’s object in python, as long as it
inherits from `Scriptable`, it automatically gains two methods:
- `.script(tir_prefix=...)`
- `.show(...)`
@junrushao junrushao force-pushed the feature/2023-01-23/printer-config branch from 1ceebbc to 8b55178 Compare January 24, 2023 07:16
@junrushao junrushao merged commit e77a6d1 into apache:main Jan 24, 2023
@Mousius
Copy link
Member

Mousius commented Feb 22, 2023

@junrushao was this meant for unity? it contains several references to relax in the code introduced. This PR wasn't left open for much time else it might've been caught during review, it would've been good to leave such a large change open a while longer. Could you please follow up and remove the relax references?

@tqchen
Copy link
Member

tqchen commented Feb 27, 2023

Thanks for getting to this thread. I think the particular set of changes won;'t cause technical debt that breaks the any code in the current mainline

But if there is a strong desire to remove(which i think is a nit TBH), we can do a followup PR.

fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
This PR introduces `PrinterConfig`, a systematic way to configure
TVMScript printer without having to set global flags.

This PR enables more customization of printer behavior. More
specifically, now any TVM’s object in python, as long as it
inherits from `Scriptable`, it automatically gains two methods:
- `.script(tir_prefix=...)`
- `.show(...)`
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.

5 participants