Skip to content

[TVMScript] Remove T.Bind backward-compat alias#18891

Merged
tqchen merged 1 commit intoapache:mainfrom
tqchen:remove-bind-alias
Mar 9, 2026
Merged

[TVMScript] Remove T.Bind backward-compat alias#18891
tqchen merged 1 commit intoapache:mainfrom
tqchen:remove-bind-alias

Conversation

@tqchen
Copy link
Member

@tqchen tqchen commented Mar 8, 2026

Summary

Test plan

  • tvmscript roundtrip/printer/ir_builder tests pass (232 passed)
  • pre-commit lint passes

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request finalizes the deprecation of the T.Bind API by eliminating its backward-compatible alias and updating all existing usages to the new T.bind function. This change streamlines the API, promotes consistent naming conventions, and cleans up the codebase by removing an outdated alias.

Highlights

  • API Renaming Cleanup: The backward-compatible alias T.Bind has been completely removed, enforcing the use of the standardized T.bind function.
  • Codebase Modernization: The Bind = bind alias was removed from ir.py, and all internal references to T.Bind across the codebase were updated to T.bind.
  • Export List Update: The string "Bind" was removed from the __all__ exports in ir.py to reflect the API change.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • python/tvm/script/ir_builder/tir/ir.py
    • Renamed the Bind function to bind.
    • Removed the bind = Bind alias assignment.
    • Updated the @deprecated decorator to reference T.bind.
    • Removed "Bind" from the __all__ export list.
  • python/tvm/script/parser/tir/parser.py
    • Updated calls from T.Bind to T.bind.
    • Modified a comment to reflect the T.bind function name.
  • tests/python/s_tir/transform/test_s_tir_transform_thread_sync.py
    • Updated all instances of T.Bind to T.bind within test functions.
  • tests/python/tir-analysis/test_tir_analysis_verify_well_formed.py
    • Updated all instances of T.Bind to T.bind within test functions.
  • tests/python/tir-transform/test_tir_inline_private_functions.py
    • Updated all instances of T.Bind to T.bind within test functions.
  • tests/python/tir-transform/test_tir_transform_convert_ssa.py
    • Updated all instances of T.Bind to T.bind within test functions.
  • tests/python/tvmscript/test_tvmscript_ir_builder_tir.py
    • Updated calls from T.Bind to T.bind and modified a related comment.
    • Updated a comment to reflect the T.bind function name.
  • tests/python/tvmscript/test_tvmscript_printer_tir.py
    • Updated calls from T.Bind to T.bind within test functions.
  • tests/python/tvmscript/test_tvmscript_roundtrip.py
    • Updated all instances of T.Bind to T.bind within test functions.
  • tests/python/tvmscript/test_tvmscript_syntax_sugar.py
    • Updated all instances of T.Bind to T.bind within test functions.
Activity
  • The author confirmed that tvmscript roundtrip/printer/ir_builder tests passed (232 tests).
  • The author confirmed that pre-commit lint checks passed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the backward-compatibility alias T.Bind, replacing all its usages with T.bind to align with PEP 8 naming conventions. The changes are applied consistently across the codebase, including the function definition, exports, and all call sites in implementation and test files. The refactoring is correct and complete.

@tqchen tqchen force-pushed the remove-bind-alias branch from eb1e4ac to 500ed20 Compare March 9, 2026 01:24
@tqchen tqchen merged commit 87bd8af into apache:main Mar 9, 2026
9 checks passed
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