You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "tqchen (via GitHub)" <gi...@apache.org> on 2026/02/21 17:18:58 UTC
[PR] [REFACTOR][TEST] Remove unused te imports from test files [tvm]
tqchen opened a new pull request, #18804:
URL: https://github.com/apache/tvm/pull/18804
This PR removes unused `from tvm import te` imports from 25 test files across the codebase, continuing the ongoing TE → TVMScript migration cleanup.
Changes:
- Remove unused `from tvm import te` from 24 test files in tir-transform/, s_tir/transform/, codegen/, arith/, all-platform-minimal-test/, and testing/
- Replace `te.var("x")` with `tvm.tir.Var("x", "int32")` in `test_s_tir_transform_decorate_device_scope.py` (the only file where te was actually used)
- Clean up stale `tvm.tir.ir_builder` comment references in `test_tir_transform_convert_ssa.py`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org
Re: [PR] [REFACTOR][TEST] Remove unused te imports from test files [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen merged PR #18804:
URL: https://github.com/apache/tvm/pull/18804
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org
Re: [PR] [REFACTOR][TEST] Remove unused te imports from test files [tvm]
Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #18804:
URL: https://github.com/apache/tvm/pull/18804#issuecomment-3939119136
## Summary of Changes
Hello @tqchen, I'm Gemini Code Assist[^1]! 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 continues the effort to migrate away from the `te` (Tensor Expression) module towards TVMScript. The primary goal is to streamline the codebase by removing unused imports and updating deprecated API calls in test files. This cleanup improves code clarity and reduces potential confusion by ensuring that only necessary modules are imported and current API standards are followed.
### Highlights
* **Unused Import Removal**: Removed `from tvm import te` imports from 24 test files across various directories (tir-transform/, s_tir/transform/, codegen/, arith/, all-platform-minimal-test/, and testing/) as part of the ongoing TE → TVMScript migration cleanup.
* **API Migration**: Replaced the deprecated `te.var("x")` with `tvm.tir.Var("x", "int32")` in `test_s_tir_transform_decorate_device_scope.py`, addressing the only instance where `te` was actively used in the affected files.
* **Comment Cleanup**: Cleaned up stale `tvm.tir.ir_builder` comment references in `test_tir_transform_convert_ssa.py` to reflect current practices.
🧠 **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](https://codeassist.google/code-review/login) to enable Memory in your admin console.**
<details>
<summary><b>Changelog</b></summary>
* **tests/python/all-platform-minimal-test/test_runtime_ndarray.py**
* Removed unused `from tvm import te` import.
* **tests/python/all-platform-minimal-test/test_runtime_packed_func.py**
* Removed unused `from tvm import te` import.
* **tests/python/arith/test_arith_domain_touched.py**
* Removed unused `from tvm import te` import.
* **tests/python/codegen/test_target_codegen_llvm_vla.py**
* Removed unused `from tvm import te` import.
* **tests/python/codegen/test_target_codegen_static_init.py**
* Removed unused `from tvm import te` import.
* **tests/python/s_tir/transform/test_s_tir_transform_compact_buffer_region.py**
* Removed unused `from tvm import te` import.
* **tests/python/s_tir/transform/test_s_tir_transform_decorate_device_scope.py**
* Removed unused `from tvm import te` import.
* Replaced `te.var("x")` with `tvm.tir.Var("x", "int32")`.
* **tests/python/s_tir/transform/test_s_tir_transform_hoist_if.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_loop_partition.py**
* Removed unused `from tvm import te` import.
* **tests/python/s_tir/transform/test_s_tir_transform_lower_cross_thread_reduction.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_lower_init_block.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_lower_opaque_block.py**
* Removed unused `from tvm import te` import.
* **tests/python/s_tir/transform/test_s_tir_transform_memhammer_lower_auto_copy.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_merge_dynamic_shared_memory_allocations.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_plan_update_buffer_allocation_location.py**
* Removed unused `from tvm import te` import.
* **tests/python/s_tir/transform/test_s_tir_transform_profiling_instr.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_thread_sync.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/s_tir/transform/test_s_tir_transform_unify_thread_binding.py**
* Modified `from tvm import te, s_tir` to `from tvm import s_tir`.
* **tests/python/testing/test_testing.py**
* Removed unused `from tvm import te` import.
* **tests/python/tir-transform/test_tir_transform_convert_ssa.py**
* Updated comments to remove references to `tvm.tir.ir_builder`.
* **tests/python/tir-transform/test_tir_transform_flatten_buffer.py**
* Removed unused `from tvm import te` import.
* **tests/python/tir-transform/test_tir_transform_make_packed_api.py**
* Modified `from tvm import te, tir` to `from tvm import tir`.
* **tests/python/tir-transform/test_tir_transform_narrow_datatype.py**
* Removed unused `from tvm import te` import.
* **tests/python/tir-transform/test_tir_transform_split_host_device.py**
* Removed unused `from tvm import te` import.
* **tests/python/tir-transform/test_tir_transform_storage_rewrite.py**
* Removed unused `from tvm import te` import.
</details>
<details>
<summary><b>Using Gemini Code Assist</b></summary>
<br>
The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.
<b>Invoking Gemini</b>
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.
<b>Customization</b>
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](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).
<b>Limitations & Feedback</b>
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: 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](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG).
<b>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](https://cloud.google.com/products/gemini/code-assist).</b>
</details>
[^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org