open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5k stars 1.49k forks source link

In training, the actual GPU memory usage is significantly higher than the model's memory footprint #2949

Open nuonepeaceyy opened 2 months ago

nuonepeaceyy commented 2 months ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

sys.platform: linux Python: 3.8.19 (default, Mar 20 2024, 19:58:24) [GCC 11.2.0] CUDA available: True MUSA available: False numpy_random_seed: 2147483648 GPU 0: NVIDIA GeForce RTX 4090 CUDA_HOME: /usr/local/cuda-11.8 NVCC: Cuda compilation tools, release 11.8, V11.8.89 GCC: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 PyTorch: 1.13.1+cu117 PyTorch compiling details: PyTorch built with:

TorchVision: 0.14.1+cu117 OpenCV: 4.9.0 MMEngine: 0.10.3 MMDetection: 3.3.0 MMDetection3D: 1.4.0+ spconv2.0: True

Reproduces the problem - code sample

I didn't make changes to the code.

Reproduces the problem - command or script

bash tools/dist_train.sh projects/BEVFusion/configs/bevfusion_lidar-cam_voxel0075_second_secfpn_8xb4-cyclic-20e_nus-3d.py 1

Reproduces the problem - error message

Thank you for your work. I recently transitioned my work from OpenPCDet to the MMDetection3D framework. However, when I attempted to retrain BEVfusion following the tutorial in the README, I noticed that the actual GPU memory usage is much higher than the memory usage recorded in the logs for the model. In fact, the memory usage recorded in the logs is consistent with the memory usage when training BEVfusion using the OpenPCDet framework. I would like to understand what is causing this additional memory usage and what steps I should take to avoid it. image image And, the GPU memory usage seems to continuously increase as the training progresses.

Additional information

No response