torch.mps.empty_cache¶ torch.mps.empty_cache()[來源][來源]¶ 釋放目前由快取配置器持有的所有未佔用的快取記憶體,以便這些記憶體可以在其他 GPU 應用程式中使用。