yzh119 commented on issue #12907:
URL: https://github.com/apache/tvm/issues/12907#issuecomment-1264185122

   If you don't want to do anything inside `init` block you can just place a 
no-op inside it, e.g.
   ```python
   @T.prim_func
   def matmul(
       A: T.Buffer[(512, 512), "float32"],
       B: T.Buffer[(512, 512), "float32"],
       C: T.Buffer[(512, 512), "float32"],
       )->None:
       for i in range(512):
           for j in range(512):
               for k in range(512):
                   with T.block("gemm"):
                       with T.init():
                           T.evaluate(0)
                       C[i, j] = C[i, j] + A[i, k] * B[j, k]
   ```
   But there must be a `init` block existing so that the entire block would be 
recognized as a reduction block.


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