torch.cuda.reset_max_memory_allocated()

torch.cuda.reset_max_memory_allocated(device=None)[源代码]

重置给定设备上最大GPU内存占用的起始点。

详情请参阅max_memory_allocated()

参数

device (torch.deviceint, 可选) – 选定的设备。如果 deviceNone(默认值),则返回当前设备的统计信息,该信息由 current_device() 给出。

警告

此函数现在调用reset_peak_memory_stats(),以重置所有峰值内存统计信息。

注意

关于GPU内存管理的更多信息,请参见内存管理

本页目录