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

[Feature Request] Support for group convolution #149

Open
digital-idiot opened this issue Mar 31, 2022 · 5 comments
Open

[Feature Request] Support for group convolution #149

digital-idiot opened this issue Mar 31, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@digital-idiot
Copy link
Contributor

Grouped convolution is supported well in pytorch's convolution layers / ops. If possible, it would a great to add that ability to torchsparse.

@zhijian-liu zhijian-liu added the enhancement New feature or request label Apr 1, 2022
@zhijian-liu
Copy link
Contributor

Thanks for bringing this up! The reason that we do not support grouped convolution is that it does not offer much speedup for sparse workloads. This is mainly because sparse convolution is memory-bounded instead of computation-bounded. That said, I think supporting this is still meaningful, and we probably need to do more optimization for it.

@ruanych
Copy link

ruanych commented Apr 7, 2022

I'm also interested in support for grouping operations~

For the design of lightweight networks such as MobileNet, the use of depthwise separable convolutions (that is, setting the number of groups to the number of input channels) can reduce the amount of parameters.

For a kernel size of KxK, C channels (assuming the same number of input and output channels)

parameters 2D 3D
convolution KxKxCxC KxKxKxCxC
depthwise separable convolution KxKxC + 1x1xCxC KxKxKxC + 1x1x1xCxC

The bottleneck of computing relative to IO may be broken by increasing the size of the convolution kernel. RepLKNet made an attempt, arXiv: https://arxiv.org/abs/2203.06717.

@zhijian-liu
Copy link
Contributor

Thanks for providing the model size perspective! We will take that into our consideration.

@zhijian-liu zhijian-liu self-assigned this Sep 23, 2022
@hontrn9122
Copy link

hontrn9122 commented Apr 13, 2024

Is there any update on the group sparse convolution? I am trying to build some Capsule layers using 3d depthwise convolution.

@yxchng
Copy link

yxchng commented May 25, 2024

any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants