Meteorix commented on a change in pull request #7146:
URL: https://github.com/apache/tvm/pull/7146#discussion_r547091793



##########
File path: python/tvm/relay/op/strategy/cuda.py
##########
@@ -657,6 +657,20 @@ def batch_matmul_strategy_cuda(attrs, inputs, out_type, 
target):
             name="batch_matmul_cublas.cuda",
             plevel=15,
         )
+    if target.kind.name == "cuda" and 
nvcc.have_tensorcore(tvm.gpu(0).compute_version):
+        x, y = inputs
+        B, M, K = get_const_tuple(x.shape)
+        B, N, K = get_const_tuple(y.shape)
+        # "The shape of (M, K, N) must be multiple of (16, 16, 16) or (32, 16, 
8) or (8, 16, 32) for now"
+        if ((M % 8 == 0 and K % 16 == 0 and N % 32 == 0) or \
+                (M % 16 == 0 and K % 16 == 0 and N % 16 == 0) or \
+                (M % 32 == 0 and K % 16 == 0 and N % 8 == 0)):

Review comment:
       I just kept the same with code for dense_tensorcore 
https://github.com/apache/tvm/blob/main/python/tvm/relay/op/strategy/cuda.py#L679




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to