there is a cuMemGetInfo function which will let you query the total memory and the free memory on the device before you call cudaMalloc. (Even though cuMemGetInfo is technically part of the driver API, you can safely use it from the Runtime API as well.)
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Allocated memory information | 1 | 3114 | January 20, 2009 | |
Get available memory on a Quadro 6000 | 1 | 645 | November 2, 2012 | |
how to get the available size of memory? | 6 | 6413 | April 17, 2008 | |
How to find out GPU memory usage (from kernel not host) | 2 | 826 | October 29, 2017 | |
Maximum amount of memory you can cudamalloc? | 5 | 15144 | February 22, 2010 | |
cudaMemGetInfo() how does it work?!? | 5 | 10746 | December 12, 2023 | |
CudaMallocManaged - how to determine max available size | 1 | 1257 | June 14, 2016 | |
available memory | 9 | 4823 | March 20, 2009 | |
How to find out how much global memory is being used? | 1 | 3283 | January 4, 2010 | |
Accurately determining available global memory on a CUDA device | 2 | 14406 | April 11, 2011 |