gemini-code-assist[bot] commented on code in PR #18399:
URL: https://github.com/apache/tvm/pull/18399#discussion_r2463010880


##########
python/tvm/relax/frontend/torch/exported_program_translator.py:
##########
@@ -1255,8 +1262,9 @@ def forward(self, input):
         # Use the importer to import the ExportedProgram to Relax.
         mod: tvm.IRModule = from_exported_program(exported_program)
     """
-    # decompose into Core ATen operators
-    exported_program.run_decompositions()
+    # Conditionally decompose into Core ATen operators
+    if run_ep_decomposition:
+        exported_program = exported_program.run_decompositions()

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Since this flag is temporary, it would be good practice to add a `TODO` 
comment here to track its future removal. This helps ensure the codebase is 
cleaned up after the migration is complete.
   
   ```python
   # TODO(user): Remove this flag and always run decomposition once all 
operators are supported.
   if run_ep_decomposition:
       exported_program = exported_program.run_decompositions()
   ```
   
   It would also be helpful to note the temporary nature of this flag in its 
docstring.



-- 
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]

Reply via email to