cbalint13 commented on issue #18224:
URL: https://github.com/apache/tvm/issues/18224#issuecomment-3215871334

   It seems that the difference is the access pattern.
   For ```relax.op.matmul```  (being transposed by default) adapting the 
template for tensorizer instrinsic works.
   
   ```
   --- dot_product_4x4_u8i8i32_desc_old.py
   +++ dot_product_4x4_u8i8i32_desc_new.py
   @@ -8,4 +8,4 @@
            for i in T.serial(0, 4):
                for k in T.serial(0, 4):
                    with T.block("update"):
   -                    vi, vk = T.axis.remap("SR", [i, k])
   -                    C[vi] = C[vi] + T.cast(A[vk], "int32") * T.cast(B[vi, 
vk], "int32")
   +                    vi, vk = T.axis.remap("SR", [i, k]) 
   +                    C[vi] = C[vi] + T.cast(A[vk], "int32") * T.cast(B[vk, 
vi], "int32")
   ```
   
   Beyond R.matmul, one must be also careful migrating relay->relax about 
layout transforms, NHWC -> HCHW (relax default).
   
   
   
   


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