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



##########
File path: python/tvm/relay/op/strategy/cuda.py
##########
@@ -324,7 +324,10 @@ def conv2d_strategy_cuda(attrs, inputs, out_type, target):
                 plevel=25,
             )
 
-    elif is_depthwise_conv2d(data.shape, layout, kernel.shape, kernel_layout, 
groups):
+    elif (
+        is_depthwise_conv2d(data.shape, layout, kernel.shape, kernel_layout, 
groups)
+        and "cudnn" not in target.libs

Review comment:
       cuDNN requires a different kernel layout than AutoTVM when the input 
layout is NHWC, in which case two implementations are not compatible. 
   
   But there is no problem with the NCHW layout, so I've refined the condition 
to 
   ```
       elif is_depthwise_conv2d(data.shape, layout, kernel.shape, 
kernel_layout, groups) and (
           layout == "NCHW" or "cudnn" not in target.libs):
   ``` 
   
    




-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to