masahi commented on a change in pull request #10495:
URL: https://github.com/apache/tvm/pull/10495#discussion_r819930922
##########
File path: python/tvm/contrib/cudnn.py
##########
@@ -741,18 +741,22 @@ def conv_backward_data(
tensor_format, pad, stride, dilation, dy.shape, w.shape,
output_padding, groups
)
- algo = conv_backward_data_find_algo(
- tensor_format,
- pad,
- stride,
- dilation,
- list(dy.shape),
- list(w.shape),
- dx_shape,
- dy.dtype,
- conv_dtype,
- groups,
- )
+ if exists():
+ # When cudnn exists, find the backward data algo
+ algo = conv_backward_data_find_algo(
+ tensor_format,
+ pad,
+ stride,
+ dilation,
+ list(dy.shape),
+ list(w.shape),
+ dx_shape,
+ dy.dtype,
+ conv_dtype,
+ groups,
+ )
+ else:
+ algo = 1
Review comment:
ok
https://github.com/apache/tvm/blob/d35b858ceb5c7157c3faa78c88eb8f8971ba5e96/src/runtime/contrib/cudnn/conv_backward.cc#L91
We don't document the algo name for forward conv2d either, so scratch my
comment above.
--
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]