Propose adding `free_one_gpu_memory_arenas(int deviceIndex)`
Hi, thanks for the beautiful work.
I notice calling `free_all_gpu_memory_arenas()` frees all GPUs' resources. However, in a multi-GPU setup, devs often have to set up a checking mechanism to make sure all devices have done their works before **one** host thread can call `free_all_gpu_memory_arenas()`.
I'm aware that there is `free_gpu_memory_arena(..)` to use with. But it only releases either 1. a cuda stream's memory or 2. global gpu memory on one device. Since there are memories on various internal cuda streams in TCNN, I don't see a way to release them individually in one go except by calling `free_all_gpu_memory_arenas()`.
So here I'd like to propose adding a `free_one_gpu_memory_arenas(int deviceIndex)` function that releases all resource **on a single GPU**. Please see if this is a valid proposal, thank you again.
关闭于 2025-11-25 2 条评论