评价此页

torch.mps.empty_cache#

torch.mps.empty_cache()[源代码]#

释放缓存分配器当前持有的所有未被占用的缓存内存,以便它们可以被其他 GPU 应用使用。