masahi commented on a change in pull request #9986:
URL: https://github.com/apache/tvm/pull/9986#discussion_r789947275
##########
File path: python/tvm/topi/cuda/conv2d.py
##########
@@ -123,3 +123,22 @@ def conv2d_cudnn(
def schedule_conv2d_cudnn(cfg, outs):
"""Create the schedule for conv2d_cudnn"""
return generic.schedule_extern(outs)
+
+
+def conv2d_backward_weight(
+ dy, x, kernel_size, padding, stride, dilation, groups, layout, output_dtype
+):
+ """Compute conv2d wgrad using CuDNN library"""
+ assert layout in ["NCHW", "NHWC"]
+ return cudnn.conv_backward_filter(
+ dy,
+ x,
+ kernel_size,
+ padding,
+ stride,
+ dilation,
+ conv_mode=1,
+ tensor_format=0 if layout == "NCHW" else 1,
+ conv_dtype=output_dtype,
+ groups=groups,
+ )
Review comment:
yes this was a mistake, thanks for spotting.
--
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]