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



##########
File path: python/tvm/relay/op/nn/_nn.py
##########
@@ -1061,6 +1062,83 @@ def compute_space_to_depth(attrs, inputs, out_dtype):
 reg.register_injective_schedule("nn.batch_to_space_nd")
 
 
[email protected]_legalize("nn.conv2d_backward_weight")
+def legalize_conv2d_backward_weight(attrs, inputs, types):

Review comment:
       Correct, for cutlass in particular, we run the BYOC flow before 
`relay.build()`, and it seems the legalize pass doesn't touch the partitioned 
function. 
   
   I've already got cutlass wgrad (also dgrad) working on top of this branch. 
The diff is 
https://github.com/masahi/tvm/compare/relay-conv2d-grad...masahi:cutlass-conv2d-grad?expand=1
   In particular, checkout the change in `test_cutlass.py` and note that I 
don't have to worry about legalize at all.
   
   For cuDNN, I'm going to add a relay op strategy for `conv2d_backward_weight` 
that only supports dispatching to cudnn call. So until we have full support for 
`conv2d_backward_weight` in topi, I imagine we run legalize only when TVM 
native compilation path is used (no cutlass / cudnn).




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