From 93cd039ba04dd80e887ec1a71f358cd86a1e5221 Mon Sep 17 00:00:00 2001 From: Masahiro Masuda Date: Sun, 12 Dec 2021 08:26:29 +0900 Subject: [PATCH] fixed nhwc cudnn depthwise conv --- python/tvm/relay/op/strategy/cuda.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/tvm/relay/op/strategy/cuda.py b/python/tvm/relay/op/strategy/cuda.py index 7bc04b45774c..307720fe5883 100644 --- a/python/tvm/relay/op/strategy/cuda.py +++ b/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 + ): if layout == "NCHW": assert kernel_layout == "OIHW" strategy.add_implementation(