zxybazh commented on issue #12135:
URL: https://github.com/apache/tvm/issues/12135#issuecomment-1192986103

   Hi thanks for reporting this issue, I think you may correct the PrimFunc by 
removing the root block definition and variable binding as follows:
   ```
   @T.prim_func
   def bad_message(
       B: T.Buffer[(64), "float32"],
       B_pack: T.Buffer[(8, 8), "float32"],
   ):
       for jo in range(8):
           for ji in range(8):
               with T.block():
                   vo, vi = T.axis.remap("SS", [jo, ji])
                   B_pack[jo, ji] = B[jo * 8 + ji]
   ```
   As for the error here, I did a bit dig in and found it was triggered when 
`Autoinline` was applied to the root block, which would throw a 
`RootBlockError` because the primitive does not operate on the root block. 
Would like to confirm with @vinx13 if this is designated behaviour? It can be 
reproduced by adding ` with T.block("root"):` before the for loop in primfunc.


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