quic-sanirudh opened a new pull request #10761:
URL: https://github.com/apache/tvm/pull/10761


   The final indices returned from transform_layout when applied on a
   `te.compute` are not simplified. Thus the returned index ranges are
   harder understand
   
   Eg: When applying NHWC to NCHWc transform_layout
   
   ```python
      iter_vars = s[B].transform_layout(lambda n,h,w,c: [n, c//4, h, w, c%4])
      print(iter_vars)
   ```
   
   iter_vars before simplification:
   ```python
   [iter_var(axis0, range(min=0, ext=((w - 1) + 1))), iter_var(axis1, 
range(min=0, ext=(floordiv(((z_div*4) - 1), 4) + 1))), iter_var(axis2, 
range(min=0, ext=((x - 1) + 1))), iter_var(axis3, range(min=0, ext=((y - 1) + 
1))), iter_var(axis4, range(min=0, ext=4))]
   ```
   
   iter_vars after simplification:
   ```python
   [iter_var(axis0, range(min=0, ext=w)), iter_var(axis1, range(min=0, 
ext=z_div)), iter_var(axis2, range(min=0, ext=x)), iter_var(axis3, range(min=0, 
ext=y)), iter_var(axis4, range(min=0, ext=4))]
   ```
   
   Thanks for contributing to TVM!   Please refer to guideline 
https://tvm.apache.org/docs/contribute/ for useful information and tips. After 
the pull request is submitted, please request code reviews from 
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
 by @ them in the pull request thread.
   


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