reset_cuda_peak_stats#
- class torchrl.reset_cuda_peak_stats(device: device | int | str | None = None)[source]#
Reset the peak-memory counters for
device.Thin wrapper around
torch.cuda.reset_peak_memory_stats(). No-op when CUDA is unavailable ordeviceis non-CUDA.- Parameters:
device – CUDA device whose peaks should be cleared.
None(default) targets the current CUDA device.
Examples
>>> from torchrl import reset_cuda_peak_stats >>> reset_cuda_peak_stats() # safe even without CUDA
See also