评价此页

torch.mps.driver_allocated_memory#

torch.mps.driver_allocated_memory()[source]#

返回进程由 Metal 驱动程序分配的总 GPU 内存(以字节为单位)。

注意

返回的大小包括 MPSAllocator 池中的缓存分配以及 MPS/MPSGraph 框架的分配。

返回类型

int