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



##########
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:
       I'm thinking about the semantic when `units` is specified but 
overwritten here. It looks like we are changing the expected output shape in 
this case, but it is fine if `units` is used basically internally. Is `units` 
mainly specified by users or other passes?




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