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 記憶體管理的更多詳細資訊,請參閱記憶體管理。