How much can I highlight on a cuda card

I am writing a server process that performs computations on a GPU using cuda. I want the queue to wait for requests until there is enough memory on the device to run the task, but it's hard for me to determine how much memory I can allocate on the device. I have a pretty good estimate of how much memory the task needs (at least how much cudaMalloc () will be allocated), but I get the device out of memory long before I allocated the total amount of available global memory.

Is there any king of the formula for calculating from the total global memory the amount that I can allocate? I can play with him until I get an assessment that works empirically, but I am worried that my clients at some point open different cards, and my falsified numbers will not work very well.

+5
source share
1 answer

The size of your DRAM GPU is the upper limit of the amount of memory that you can allocate through cudaMalloc, but there is no guarantee that the CUDA runtime can satisfy the request for all of this in one large distribution or even a series of small allocations.

. , GPU , , . , (, ), . , , , .

API CUDART cudaMemGetInfo . , API, .

+5

All Articles