Open Brosy-qj opened 6 months ago
6G显存的的确确太少了。我们测试用的都是24G的显卡,这段代码如果没有大量优化,确实很难在6G卡上运行。最好能有16G的显存。
你好,我使用的是24G的GPU,运行“python demo/run.py configs/kitti/kitti_01.yaml” 依然报RuntimeError: CUDA out of memory的错误,请问还有什么解决方案吗?
post-processing steps: 100%|███████████████████| 37/37 [02:43<00:00, 4.43s/it] (601, 4, 4) tracking frame: 55%|██████████▍ | 602/1101 [1:56:27<10:48:41, 78.00s/it]Process Process-2: Traceback (most recent call last): File "/home/panwb/anaconda3/envs/LOAM/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/home/panwb/anaconda3/envs/LOAM/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, *self._kwargs) File "/home/panwb/NerfLOAM/NeRF-LOAM/src/mapping.py", line 112, in spin self.do_mapping(share_data, tracked_frame) File "/home/panwb/NerfLOAM/NeRF-LOAM/src/mapping.py", line 179, in do_mapping bundle_adjust_frames( File "/home/panwb/NerfLOAM/NeRF-LOAM/src/variations/render_helpers.py", line 394, in bundle_adjust_frames final_outputs = render_rays( File "/home/panwb/NerfLOAM/NeRF-LOAM/src/variations/render_helpers.py", line 211, in render_rays intersections, hits = ray_intersect( File "/home/panwb/anaconda3/envs/LOAM/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(args, *kwargs) File "/home/panwb/NerfLOAM/NeRF-LOAM/src/variations/voxel_helpers.py", line 534, in ray_intersect pts_idx, min_depth, max_depth = svo_ray_intersect( File "/home/panwb/NerfLOAM/NeRF-LOAM/src/variations/voxel_helpers.py", line 108, in forward children = children.expand(S G, *children.size()).contiguous() RuntimeError: CUDA out of memory. Tried to allocate 5.51 GiB (GPU 0; 23.64 GiB total capacity; 2.38 GiB already allocated; 10.22 GiB free; 5.63 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
看上去完全是有空间的,报错地方显示你有10GB的剩余空间,但是只需要分配5.5GB,因此你需要检查一下有没有别的进程在跑,或者已经结束但没退出的进程。
你好,我使用的是6G的GPU,我修改了chunk_size为chunk_size//10 ~ chunk_size//10000之后依然报错,请问还有其他解决方案吗?