patschmidt2 commented on issue #16566:
URL: https://github.com/apache/tvm/issues/16566#issuecomment-1943821770

   @LeiWang1999 That is exactly what I tried ported to my local version of TVM. 
It does go in the right direction, I just need a way to tell the Simplifier to 
completely remove the unit IterVar. Currently, this is the intrinsic 
description after the simplify step:
   
   ```
   with T.block("root"):
       C = T.Buffer((1, 512), "int8", offset_factor=1)
       A = T.Buffer((1, 1024), "int8", offset_factor=1)
       B = T.Buffer((1024, 512), "int8", offset_factor=1)
       T.reads(C[0, 0:512], A[0, 0:1024], B[0:1024, 0:512])
       T.writes(C[0, 0:512])
       for i, k, j in T.grid(1, 1024, 512):
           with T.block(""):
               vii = T.axis.spatial(1, 0)
               vjj, vkk = T.axis.remap("SR", [j, k])
               T.reads(C[0, vjj], A[0, vkk], B[vkk, vjj])
               T.writes(C[0, vjj])
               C[0, vjj] = C[0, vjj] + A[0, vkk] * B[vkk, vjj]
   ```
   
   The variable `vii` is still in there, although it is not used. Still, the 
IRComparator complains that the two values are not equal. If you know of a way 
to tell the Simplify step to remove `vii` I think that should do the trick.


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