# tensorplay.cuda.memory_reserved

Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_reserved.html

# tensorplay.cuda.memory_reserved

tensorplay.cuda.memory_reserved(device: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)[[source]](../_modules/tensorplay/cuda/memory.html#memory_reserved)

Return the current GPU memory managed by the caching allocator in bytes for a given device.

Parameters:

device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/functions.html#int), optional) – selected device. Returns
statistic for the current device, given by
[current_device()](tensorplay.cuda.current_device.html#tensorplay.cuda.current_device), if [device](tensorplay.cuda.device.html#tensorplay.cuda.device) is
None (default).
