Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround to make conv2d_transpose compilation for CUDA work #4472

Merged
merged 1 commit into from
Dec 8, 2019

Conversation

@@ -186,7 +186,9 @@ def _callback(op):

if cfg.is_fallback:
N, F, Y, X = get_const_tuple(conv.shape)
_fallback_schedule(N, F, Y, X)
# Workaround to make CUDA compilation work. Issue #4470
Copy link
Member

@vinx13 vinx13 Dec 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we still use the fallback for the other cases by checking the input params here?

Copy link
Contributor Author

@apivovarov apivovarov Dec 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked more kernel and strides combinations and found that the error happens when kernel is equal to strides, e.g.

# kernel and strides when compilation for CUDA fails
2x2 and (2,2)
3x3 and (3,3)
4x4 and (4,4)
5x5 and (5,5)
2x3 and (2,3)
3x2 and (3,2)
1x2 and (1x2)
etc

I also found that the compilation fails if output channel is 1

Copy link
Contributor Author

@apivovarov apivovarov Dec 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added kernel / strides check and skip _fallback_schedule when output channel is 1.
In other case It will run _fallback_schedule for kernel 1x1 or when kernel != strides

@vinx13 vinx13 merged commit 3fa8097 into apache:master Dec 8, 2019
zxy844288792 pushed a commit to zxy844288792/tvm that referenced this pull request Dec 13, 2019
alexgl-github added a commit to alexgl-github/tvm that referenced this pull request Jan 21, 2020
alexgl-github added a commit to alexgl-github/tvm that referenced this pull request Jan 21, 2020
vinx13 pushed a commit that referenced this pull request Jan 22, 2020
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 26, 2020
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 28, 2020
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants