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


##########
tests/python/relax/test_frontend_from_exported_program.py:
##########
@@ -5222,17 +5222,17 @@ def forward(self, data):
     class Expected:
         @R.function
         def main(
-            inp_0: R.Tensor((5,), dtype="float32"),
+            data: R.Tensor((5,), dtype="float32"),
         ) -> R.Tuple(R.Tensor((5,), dtype="float32")):
             with R.dataflow():
-                lv: R.Tensor((5,), dtype="float32") = R.zeros_like(inp_0, 
dtype="void")
+                lv: R.Tensor((5,), dtype="float32") = R.zeros(R.shape([5]), 
dtype="float32")

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   For consistency with other tests for zero-creation operators like 
`test_zeros`, it would be better to use `R.full` here. `torch.empty_like` is 
decomposed to `aten.zeros`, and in other tests `torch.zeros` is decomposed to 
`aten.full` which is then translated to `R.full`. Using `R.full` directly would 
make the expected IR more canonical and consistent across these tests.
   
   ```suggestion
                   lv: R.Tensor((5,), dtype="float32") = R.full(R.shape([5]), 
R.const(0.0, "float32"), dtype="float32")
   ```



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