# tensorplay.cuda.memory_stats Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_stats.html ```python tensorplay.cuda.memory_stats(device: Any = None) → dict[str, Any] ``` Return a dictionary of CUDA memory allocator statistics for a given device. The return value of this function is a dictionary of statistics, each of the full key layout; keys that are not tracked by this TensorPlay build are always reported as zero. Parameters: device ([tensorplay.Device](/docs/generated/tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/builtins/functions.html#int), optional) – selected device. Returns statistics for the current device, given by [current_device()](/docs/generated/tensorplay.cuda.current_device.html#tensorplay.cuda.current_device), if [device](/docs/generated/tensorplay.cuda.device.html#tensorplay.cuda.device) is None (default).