Force CUDA memory cleanup via the shared library's pool instance
| 21 | |
| 22 | // Force CUDA memory cleanup via the shared library's pool instance |
| 23 | void forceMemoryCleanup() { |
| 24 | cudaDeviceSynchronize(); |
| 25 | Tensor::trim_memory_pool(); |
| 26 | cudaDeviceSynchronize(); |
| 27 | } |
| 28 | |
| 29 | } // namespace |
| 30 |