reset_peak_memory_stats
- paddle.cuda. reset_peak_memory_stats ( device: PlaceLike | int | None = None ) None [source]
-
Resets all devices’ peak memory statistics.
This method resets the peak memory usage recorded for each device during the execution of the program. It sets the peak memory usage back to zero for all devices.
Example
>>> >>> import paddle >>> paddle.device.set_device('gpu') # or '<custom_device>' >>> # paddle.cuda.reset_max_memory_allocated() is equivalent to paddle.device.reset_max_memory_allocated() >>> paddle.device.reset_max_memory_allocated(paddle.CUDAPlace(0)) >>> paddle.device.reset_max_memory_allocated(0) >>> paddle.device.reset_max_memory_allocated("gpu:0")
