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] Linter-friendly function definitions #13713

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

cyx-6
Copy link
Contributor

@cyx-6 cyx-6 commented Jan 6, 2023

Initially, the functions like T.int8, T.uint32 and T.float64x64 were generated by loops and use globals() to add symbols globally to reduce code complexity.
But for linters like Pylint may not be able to look into globals(), where the functions defined implicitly.
This pr refactors the definitions of these functions explicitly for better linter experience.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jan 6, 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
Copy link
Member

Thanks for the PR! I will verify it myself before approving :-)

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

LGTM!

@junrushao junrushao merged commit 875296c into apache:main Jan 7, 2023
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
Initially, the functions like `T.int8`, `T.uint32` and `T.float64x64` were generated by loops and use `globals()` to add symbols globally to reduce code complexity.
But for linters like Pylint may not be able to look into `globals()`, where the functions defined implicitly.
This pr refactors the definitions of these functions explicitly for better linter experience.
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.

3 participants