# tensorplay.cuda.memory_summary

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

# tensorplay.cuda.memory_summary

tensorplay.cuda.memory_summary(device: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [None](https://docs.python.org/3/library/constants.html#None) = None, abbreviated: [bool](https://docs.python.org/3/library/functions.html#bool) = False) &#x2192; [str](https://docs.python.org/3/library/stdtypes.html#str)[[source]](../_modules/tensorplay/cuda/memory.html#memory_summary)

Return a human-readable printout of the current memory allocator statistics for a given device.

This can be useful to display periodically during training, or when
handling out-of-memory exceptions.

Parameters:

- device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/functions.html#int) , optional ) – selected device. Returns printout 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).

- abbreviated ([bool](https://docs.python.org/3/library/functions.html#bool) , optional ) – whether to return an abbreviated summary (default: False).
