評價此頁

torch.mps.current_allocated_memory#

torch.mps.current_allocated_memory()[原始碼]#

以位元組為單位返回當前由張量佔用的 GPU 記憶體。

注意

返回的大小不包括 MPSAllocator 記憶體池中的快取分配。

返回型別

int