torch.mps.empty_cache¶ torch.mps.empty_cache()[原始碼][原始碼]¶ 釋放快取分配器當前持有的所有未佔用快取記憶體,以便這些記憶體可用於其他 GPU 應用程式。