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] Use triple-quoted python strings for metadata #15564

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

Lunderberg
Copy link
Contributor

Prior to this commit, all metadata was output as a single-quoted python string with escaped newlines. This single line could become extremely long, which can cause some text editors to run slowly (e.g. emacs).

This commit updates the TVMScript printer to instead output the metadata using a triple-quoted python string with embedded newlines. Because the metadata is a pretty-printed JSON string, it contains frequent newlines that prevent the line length from causing editor lag.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Aug 15, 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.

Generated by tvm-bot

Prior to this commit, all metadata was output as a single-quoted
python string with escaped newlines.  This single line could become
extremely long, which can cause some text editors to run
slowly (e.g. emacs).

This commit updates the TVMScript printer to instead output the
metadata using a triple-quoted python string with embedded newlines.
Because the metadata is a pretty-printed JSON string, it contains
frequent newlines that prevent the line length from causing editor
lag.
@Lunderberg Lunderberg force-pushed the unity_triple_quoted_metadata branch from 7aa9093 to e15e839 Compare August 15, 2023 16:31
@Lunderberg Lunderberg changed the base branch from unity to main August 15, 2023 16:31
@Lunderberg
Copy link
Contributor Author

Updated PR to target main, as this change does not depend on any Relax-specific TVMScript handling.

@quic-sanirudh quic-sanirudh merged commit 0c6fbb8 into apache:main Aug 16, 2023
@Lunderberg Lunderberg deleted the unity_triple_quoted_metadata branch August 16, 2023 13:25
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.

4 participants