cudaMemInfo: Determine the memory on the active GPU

Description Usage Value Author(s) References See Also Examples

Description

This function determines the total and free memory available on the current GPU.

Usage

1

Value

A numeric vector of length 3 with elements giving the total number of bytes free, total number of available bytes and the percentage free.

Author(s)

Duncan Temple Lang

References

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g808f555540d0143a331cc42aa98835c0

See Also

copyToDevice, cudaAlloc

Examples

1
2
3
4
5
if(getNumDevices() > 0) {
 cuGetContext(TRUE)
 cuMemInfo()[3]  # percentage free
 cuMemInfo()[1:2]  # totals
}

duncantl/RCUDA documentation built on May 15, 2019, 5:26 p.m.