How can I know how much available global device memory I have at any moment ? The problem : program works at my PC but not at my customer PC although his PC has 800 Mb while my - 384. CudaMalloc fails. I want to know do I have contiguous block of enough size to make memory request.
I think his memory was occupied by another program. Is there a way to get memory map ?
Thanks for the help, especially the valgrind hint. I’ll have a look.
The google search shows a driver API method of accessing an available memory value. I’m trying to do the same thing using the runtime API. ‘tmurray’ (who I guess works at NVIDIA) said above that it could be accessed using runtime.
And he said it even works from a runtime API application… It is one of the few driver API functions you can call from the runtime API without causing any problems. Just make sure you’ve initialized the context first by calling cudaMalloc() or something.