gemini-code-assist[bot] commented on PR #18763:
URL: https://github.com/apache/tvm/pull/18763#issuecomment-3888326219

   ## 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 undertakes a significant refactoring effort by removing 
the `BufferRealize` node from the TensorIR (TIR) schedule. This change 
streamlines the IR representation by eliminating a legacy construct that is no 
longer required, simplifying the codebase and reducing maintenance overhead. 
The removal impacts core IR definitions, various IR processing utilities, and 
associated transformation passes and tests, aligning the system with a more 
modern and efficient IR design.
   
   ### Highlights
   
   * **Removal of BufferRealize Node**: The `BufferRealize` node, identified as 
a legacy component in the TensorIR (TIR) schedule, has been completely phased 
out from the codebase. This involves removing its C++ and Python definitions, 
as well as all related helper functions and constants.
   * **Updated IR Builder and Functors**: All references to `BufferRealize` 
have been removed from TIR's IR builder, statement visitors, and mutators 
across both C++ and Python implementations. This ensures that the IR processing 
pipeline no longer recognizes or attempts to handle this deprecated node type.
   * **Elimination of InjectRollingBuffer Pass**: The `InjectRollingBuffer` 
transformation pass, which was dependent on `BufferRealize`, has been removed 
entirely. This includes its C++ implementation file and associated Python 
bindings and tests.
   * **Test Suite Refinement**: Numerous test cases that either directly tested 
`BufferRealize` functionality or included it in their IR structures have been 
updated or removed to reflect its deprecation and removal, ensuring the test 
suite remains consistent with the current IR design.
   
   🧠 **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>
   
   * **include/tvm/script/ir_builder/tir/frame.h**
       * Removed `RealizeFrameNode` and `RealizeFrame` class definitions.
   * **include/tvm/script/ir_builder/tir/ir.h**
       * Removed the `Realize` function declaration.
   * **include/tvm/tir/stmt.h**
       * Removed `BufferRealizeNode` and `BufferRealize` class definitions.
       * Removed `realize_scope` and `rolling_buffer_scope` constants.
   * **include/tvm/tir/stmt_functor.h**
       * Removed `VisitStmt_(const BufferRealizeNode* op)` from `StmtFunctor`, 
`StmtVisitor`, and `StmtMutator`.
   * **python/tvm/script/ir_builder/tir/frame.py**
       * Removed the `RealizeFrame` class definition.
   * **python/tvm/script/ir_builder/tir/ir.py**
       * Removed the `realize` function and its import.
   * **python/tvm/script/parser/core/evaluator.py**
       * Removed 'realize' from the list of attributes to be ignored during 
evaluation.
   * **python/tvm/tir/__init__.py**
       * Removed the import for `BufferRealize`.
   * **python/tvm/tir/functor.py**
       * Removed `BufferRealize` from imports.
       * Removed `f_visit_buffer_realize` and `visit_buffer_realize_` methods 
from `PyStmtExprVisitor` and `PyStmtExprMutator`.
   * **python/tvm/tir/stmt.py**
       * Removed the `BufferRealize` class definition.
   * **python/tvm/tir/transform/transform.py**
       * Removed the `InjectRollingBuffer` function.
   * **src/relax/transform/dataflow_inplace.cc**
       * Removed the `VisitStmt_(const tir::BufferRealizeNode* op)` method.
   * **src/s_tir/analysis/sblock_buffer_access_lca_detector.cc**
       * Removed the `VisitStmt_(const BufferRealizeNode* op)` method.
   * **src/s_tir/transform/plan_update_buffer_allocation_location.cc**
       * Removed the `VisitStmt_(const BufferRealizeNode* op)` method.
   * **src/script/ir_builder/tir/frame.cc**
       * Removed `RealizeFrameNode::RegisterReflection()` and 
`RealizeFrameNode::ExitWithScope()`.
   * **src/script/ir_builder/tir/ir.cc**
       * Removed the `Realize` function definition and its FFI registration.
   * **src/script/printer/tir/stmt.cc**
       * Removed the `DocsifyBufferRealize` function and its dispatch 
registration.
   * **src/tir/backend/adreno/texture_flatten.cc**
       * Removed the `VisitStmt_(const BufferRealizeNode* op)` method.
   * **src/tir/ir/py_functor.cc**
       * Removed `f_visit_buffer_realize` and related dispatch logic from 
`PyStmtExprVisitorNode` and `PyStmtExprMutatorNode`.
   * **src/tir/ir/stmt.cc**
       * Removed `BufferRealizeNode::RegisterReflection()` and the 
`BufferRealize` constructor/registration.
   * **src/tir/ir/stmt_functor.cc**
       * Removed the `VisitStmt_(const BufferRealizeNode* op)` method from 
`StmtVisitor` and `StmtMutator`.
   * **src/tir/ir/tir_visitor_with_path.cc**
       * Removed the `VisitStmt_(const BufferRealizeNode* op)` method.
   * **src/tir/ir/tir_visitor_with_path.h**
       * Removed the declaration for `VisitStmt_(const BufferRealizeNode* op)`.
   * **src/tir/transform/inject_rolling_buffer.cc**
       * Removed the entire file, eliminating the `InjectRollingBuffer` pass.
   * **src/tir/transform/unsupported_dtype_legalize.cc**
       * Removed the `VisitStmt_(const BufferRealizeNode* op)` method from 
`ComputeLegalizer` and `StorageLegalizer`.
   * **tests/python/contrib/test_hexagon/test_2d_physical_buffers.py**
       * Removed `tvm.tir.BufferRealize` from the `extract_buffers` function.
   * **tests/python/tir-analysis/test_tir_analysis_verify_well_formed.py**
       * Removed test cases related to `T.realize`.
   * **tests/python/tir-base/test_tir_nodes.py**
       * Removed the test case for `tvm.tir.BufferRealize`.
   * **tests/python/tir-transform/test_tir_transform_inject_rolling_buffer.py**
       * Removed the entire file, eliminating tests for the 
`InjectRollingBuffer` pass.
   * **tests/python/tvmscript/test_tvmscript_error_report.py**
       * Adjusted error line numbers and removed references to `T.realize` and 
`realize_scope`.
   * **tests/python/tvmscript/test_tvmscript_ir_builder_tir.py**
       * Removed the `test_ir_builder_tir_realize` function.
   * **tests/python/tvmscript/test_tvmscript_printer_tir.py**
       * Removed the `test_buffer_realize` function.
   * **tests/python/tvmscript/test_tvmscript_roundtrip.py**
       * Removed `opt_gemm_normalize` and `opt_conv_tensorcore_normalize` 
functions and their references from test parameters.
   </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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to