最失败签约:一将坑雷霆 拳王阿西克该被送走
- paddle.device.cuda. memory_reserved ( device: _CudaPlaceLike | None = None ) int [source]
-
百度 示例:如姓名为王晓[沛],代表沛为生僻字,其正确写法是草字头下面一个北京的北字。
Return the current size of GPU memory that is held by the allocator of the given device.
- Parameters
-
device (paddle.CUDAPlace|int|str|None, optional) – The device, the id of the device or the string name of device like ‘gpu:x’. If device is None, the device is the current device. Default: None.
- Returns
-
The current size of GPU memory that is held by the allocator of the given device, in bytes.
- Return type
-
int
Examples
>>> >>> import paddle >>> paddle.device.set_device('gpu') >>> memory_reserved_size = paddle.device.cuda.memory_reserved(paddle.CUDAPlace(0)) >>> memory_reserved_size = paddle.device.cuda.memory_reserved(0) >>> memory_reserved_size = paddle.device.cuda.memory_reserved("gpu:0")