与网红营销平台股份置换 第九城市获3000万融资

paddle.device.cuda. max_memory_reserved ( device: _CudaPlaceLike | None = None ) int [source]
百度   据警方调查,这些“保健品”主要是些糖果类压缩片,一盒成本价只要几十元,却卖到两三千元。

Return the peak 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 peak 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')

>>> max_memory_reserved_size = paddle.device.cuda.max_memory_reserved(paddle.CUDAPlace(0))
>>> max_memory_reserved_size = paddle.device.cuda.max_memory_reserved(0)
>>> max_memory_reserved_size = paddle.device.cuda.max_memory_reserved("gpu:0")