torch.cuda.reset_max_memory_allocated¶
- torch.cuda.reset_max_memory_allocated(device=None)[來源][來源]¶
重設追蹤特定裝置上 tensors 佔用之最大 GPU 記憶體的起點。
詳情請參閱
max_memory_allocated()
。- 參數
device (torch.device 或 int, 選填) – 選定的裝置。如果
device
為None
(預設),則傳回由current_device()
給定的目前裝置的統計資訊。
警告
此函式現在會呼叫
reset_peak_memory_stats()
,它會重設 /所有/ 峰值記憶體統計資訊。注意
有關 GPU 記憶體管理的更多詳細資訊,請參閱 記憶體管理。