Skip to content

fix bug in 3d group convolution #9860

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

Closed

Conversation

stephenyan1231
Copy link
Contributor

Summary:
For 3D group convolution, in the case of CUDNN 7 and NCHWD order, filter dim is (M, C/group_, k_h, h_w, k_d).

According to CUDA doc (https://docs.nvidia.com/deeplearning/sdk/cudnn-developer-guide/index.html#grouped-convolutions), the existing implementation is incorrect, and will crash the 3d video model training with group convolution.

In the implementation, filter.dims(1) is already C/group_. So don't need to divide it by group_ again.

Differential Revision: D9008807

@bddppq
Copy link
Contributor

bddppq commented Jul 26, 2018

@slayton58

@houseroad houseroad requested a review from xiaomengy July 26, 2018 05:41
@houseroad
Copy link
Member

@stephenyan1231 could you also add appropriate test cases to cover your fix?

Summary:
Pull Request resolved: pytorch#9860

For 3D group convolution, in the case of CUDNN 7 and NCHWD order, filter dim is (M, C/group_, k_h, h_w, k_d).

According to CUDA doc (https://docs.nvidia.com/deeplearning/sdk/cudnn-developer-guide/index.html#grouped-convolutions), the existing implementation is incorrect, and will crash the 3d video model training with group convolution.

In the implementation, `filter.dims(1)` is already `C/group_`. So don't need to divide it by `group_` again.

Differential Revision: D9008807

fbshipit-source-id: 5c2ebe12a0db875d593e0457136aaab6ecf27660
Copy link
Contributor

@xiaomengy xiaomengy left a comment

Choose a reason for hiding this comment

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

Thanks Zhicheng, I tested it and it should works. I will update the related group conv test so that we can test it in the future.

goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
Pull Request resolved: pytorch#9860

For 3D group convolution, in the case of CUDNN 7 and NCHWD order, filter dim is (M, C/group_, k_h, h_w, k_d).

According to CUDA doc (https://docs.nvidia.com/deeplearning/sdk/cudnn-developer-guide/index.html#grouped-convolutions), the existing implementation is incorrect, and will crash the 3d video model training with group convolution.

In the implementation, `filter.dims(1)` is already `C/group_`. So don't need to divide it by `group_` again.

Reviewed By: BIT-silence

Differential Revision: D9008807

fbshipit-source-id: 2f0d6eb47f4e16d7417a7e3baeba709e3254154f
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants