Phoslight opened a new pull request, #18120:
URL: https://github.com/apache/tvm/pull/18120

   The unit test `test_rewrite_of_implicit_tuple_with_three_elements()` has 
been failing due to a mismatch between the test IR and the expected pattern 
structure.
   
   After some investigations, the failure is not caused by an issue in the 
rewriter implementation, but rather by a mismatch in the return structure of 
the `before()` pattern function. The pattern defined in the test expects the 
final expression to be a 
[tuple](https://github.com/apache/tvm/blob/7bd738a00b08ee5cd89623075f2f692c246881fd/tests/python/relax/test_dataflow_rewriter.py#L1115),
 but `before()` directly uses [unpacked 
values](https://github.com/apache/tvm/blob/7bd738a00b08ee5cd89623075f2f692c246881fd/tests/python/relax/test_dataflow_rewriter.py#L1149),
 causing the pattern match to fail.
   
   To fix the test, we can simply add a tuple to match the pattern. Also, the 
rewritten function generates a natural indexing order (`0 -> 1 -> 2`), but the 
test has a different order [(`2 -> 0 -> 
1`)](https://github.com/apache/tvm/blob/7bd738a00b08ee5cd89623075f2f692c246881fd/tests/python/relax/test_dataflow_rewriter.py#L1172-L1174)
 so we should update the indexing order in the test accordingly.
   
   To reproduce:
   ```
   <python> -m pytest -s -v 
tests/python/relax/test_dataflow_rewriter.py::test_rewrite_of_implicit_tuple_with_three_elements
   ```
   
   Thanks,


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