Skip to content

Commit

Permalink
allow target none
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Feb 1, 2022
1 parent 83e7af7 commit a031085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tvm/topi/nn/conv2d_transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a031085

Please sign in to comment.