Closed xiebinghua closed 9 months ago
Hi,
i had a similar problem when using open3d:t:geometry:pointcloud functions on the GPU in C++ and looping over some dataset. I watched the GPU Memory and it slowly got more and more used. My solution was to add
open3d::core::MemoryManagerCached::ReleaseCache(device);
at the end of the loop to free up the GPU Memory (see) . I didn't find any python binding to that C++ class/function, so i am not sure it helps, but maybe i gives some additional information.
Kind regards!
open3d::core::MemoryManagerCached::ReleaseCache(device)
can not find in python, but o3c.cuda.release_cache()
can release cuda memory. I test it, and solve my problem.
open3d::core::MemoryManagerCached::ReleaseCache(device)
can not find in python, buto3c.cuda.release_cache()
can release cuda memory. I test it, and solve my problem.
It perfectly solve my problem, thanks.
Checklist
master
branch).Describe the issue
the open3d edition is 0.16.0 The situation is like this: first, I read the point cloud data onto the GPU, and then I perform downsampling operations on it, such as functions such as voxel_down_sample(voxel_size=0.01).remove_radius_outliers(10, 0.05)[0]. After the above operation is completed, I use the to_legacy() function to move it to the CPU, and I will perform some calculations on the CPU in the future. I will use loops to perform the above operations on each different point cloud data, and as the number of operations increases or loops, there will be problems with cuda runtime error : out of memory 。
Steps to reproduce the bug
Error message
RuntimeError: [Open3D Error] (void open3d::core::__OPEN3D_CUDA_CHECK(cudaError_t, const char*, int)) /root/Open3D/cpp/open3d/core/CUDAUtils.cpp:289: /root/Open3D/cpp/open3d/core/MemoryManagerCUDA.cpp:24 CUDA run time error: out of memory
Expected behavior
we wish problem mentioned above is fixed, we don't meet cuda out of memory
Open3D, Python and System information
Additional information
No response