memory_total
- paddle.device.xpu. memory_total ( device: _XPUPlaceLike | None = None ) int [source]
-
Return the total size of XPU memory of the given device that is held by the XPU Runtime.
- Parameters
-
device (paddle.XPUPlace|int|str|None, optional) – The device, the id of the device or the string name of device like ‘xpu:x’. If device is None, the device is the current device. Default: None.
- Returns
-
The total size of XPU memory of the given device that is held by the XPU Runtime, in bytes.
- Return type
-
int
Examples
>>> >>> import paddle >>> paddle.device.set_device('xpu') >>> memory_total_size = paddle.device.xpu.memory_total(paddle.XPUPlace(0)) >>> memory_total_size = paddle.device.xpu.memory_total(0) >>> memory_total_size = paddle.device.xpu.memory_total("xpu:0")