monklof commented on a change in pull request #7496:
URL: https://github.com/apache/tvm/pull/7496#discussion_r595686814



##########
File path: python/tvm/topi/cuda/dense.py
##########
@@ -39,14 +39,11 @@ def dense_cublas(cfg, data, weight, bias=None, 
out_dtype=None):
     if out_dtype is None:
         out_dtype = data.dtype
     assert out_dtype == data.dtype, "Mixed precision not supported."
-    batch, in_dim = data.shape
-    out_dim, _ = weight.shape
+    batch, in_dim = get_const_tuple(data.shape)
+    out_dim, _ = get_const_tuple(weight.shape)
     matmul = cublas.matmul(data, weight, False, True)
-    if isinstance(batch, int):
+    if all(isinstance(d, int) for d in [batch, in_dim, out_dim]):

Review comment:
       get_const_tuple() will convert IntImm to int




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