torch.cuda.reset_max_memory_allocated()
- torch.cuda.reset_max_memory_allocated(device=None)[源代码]
-
重置给定设备上最大GPU内存占用的起始点。
详情请参阅
max_memory_allocated()
。- 参数
-
device (torch.device 或 int, 可选) – 选定的设备。如果
device
为None
(默认值),则返回当前设备的统计信息,该信息由current_device()
给出。
警告
此函数现在调用
reset_peak_memory_stats()
,以重置所有峰值内存统计信息。注意
关于GPU内存管理的更多信息,请参见内存管理。