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

Too high GRAM consumption for spconv indexing #983

Open
zhanggefan opened this issue Oct 7, 2021 · 2 comments
Open

Too high GRAM consumption for spconv indexing #983

zhanggefan opened this issue Oct 7, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@zhanggefan
Copy link
Contributor

I am trying to reimplement the PVRCNN using this codebase and I found that the GRAM consumption during training on kitti is unacceptably high compare to OpenPCDet. There is the a surge in GRAM consumption for approximately 4GB for the first time when get_indice_pairs is called.

After some investigation I found that the spconv used by MMDet3D is a customized version, and I also found that the following 4096 seems to be the root cause of it. Changing them to 27 would solve the problem, but in an ugly way (all conv kernels larger than 3x3x3 would fail then).

prepareDeConvIndicePairsKernel<Index, IndexGrid, NDim, 4096>

prepareIndicePairsKernel<Index, IndexGrid, NDim, 4096>

getSubMIndicePairsKernel<Index, IndexGrid, NDim, 4096>

@Tai-Wang Tai-Wang added the enhancement New feature or request label Oct 12, 2021
@ZwwWayne
Copy link
Collaborator

ZwwWayne commented Oct 12, 2021

The spconv in MMDet3D is adopted from an early version (around 1.0) of spconv. The settings of kernel are not changed.

Do we have a more flexible way to handle this case? Like CUDA operators in MMCV, these numbers are usually not hardcoded. If we have a flexible way to handle these number, we can create a PR to fix that.

BTW, we are migrating CUDA operators to MMCV, feel free to have a look or review it if you are interested.

@ZwwWayne
Copy link
Collaborator

The progress can be find here #994

Divadi added a commit to Divadi/Spconv-OpenPCDet that referenced this issue Nov 2, 2021
Referencing open-mmlab/mmdetection3d#983
MMDetection3D's spconv implementation previously cannot fit PV-RCNN with batch size 2 into a 2080 Ti. By changing this, it now can. However, as mentioned in the issue, this limits kernel sizes to 3x3x3 (which is not an issue for OpenPCDet models)
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

3 participants