masahi commented on a change in pull request #9030:
URL: https://github.com/apache/tvm/pull/9030#discussion_r710496654



##########
File path: python/tvm/topi/cuda/tensorcore_alter_op.py
##########
@@ -176,6 +176,12 @@ def _dense_legalize(attrs, inputs, arg_types):
 
     x_ = relay.nn.pad(x, pad_width=((0, dm), (0, dk))) if dm or dk else x
     y_ = relay.nn.pad(y, pad_width=((0, dn), (0, dk))) if dn or dk else y
+
+    # If units is explicitly specified, it is used to compute the output shape.
+    # We need to update units after padding to prevent a type error.
+    if attrs["units"] is not None:
+        new_attrs["units"] = N + dn

Review comment:
       Apparently, the dense tensorcore schedule is not used when batch size is 
1. That's probably the reason this error is not frequent.  




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