From 9b8e56d7d3e945c2f4b693851fbe3190e47aa54f Mon Sep 17 00:00:00 2001 From: Masahiro Masuda Date: Mon, 31 Jan 2022 21:07:40 +0900 Subject: [PATCH] allow target none --- python/tvm/topi/nn/conv2d_transpose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tvm/topi/nn/conv2d_transpose.py b/python/tvm/topi/nn/conv2d_transpose.py index b351af991ae6f..5638d3d77fd28 100644 --- a/python/tvm/topi/nn/conv2d_transpose.py +++ b/python/tvm/topi/nn/conv2d_transpose.py @@ -301,8 +301,8 @@ def conv2d_transpose_legalize(attrs, inputs, types): data, kernel = inputs kernel_layout = attrs["kernel_layout"] - target = tvm.target.Target.current(allow_none=False) - if "cudnn" in target.libs: + target = tvm.target.Target.current(allow_none=True) + if target and "cudnn" in target.libs: # cuDNN backend can directly operate on NHWC layout. return None