torch.cuda.memory.reset_max_memory_allocated#
- torch.cuda.memory.reset_max_memory_allocated(device=None)[source]#
重置給定裝置上用於跟蹤張量所佔最大 GPU 記憶體的起始點。
有關詳細資訊,請參閱
max_memory_allocated()。- 引數
device (torch.device 或 int, 可選) – 選擇的裝置。如果
device為None(預設),則返回當前裝置(由current_device()指定)的統計資訊。
警告
此函式現在呼叫
reset_peak_memory_stats(),該函式會重置 /所有/ 峰值記憶體統計資訊。注意
有關 GPU 記憶體管理的更多詳細資訊,請參閱 記憶體管理。