评价此页

torch.cuda.memory.reset_max_memory_allocated#

torch.cuda.memory.reset_max_memory_allocated(device=None)[source]#

重置给定设备上用于跟踪张量所占最大 GPU 内存的起始点。

有关详细信息,请参阅 max_memory_allocated()

参数

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

警告

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

注意

有关 GPU 内存管理的更多详细信息,请参阅 内存管理