torch.mps.current_allocated_memory¶ torch.mps.current_allocated_memory()[原始碼][原始碼]¶ 返回當前張量佔用的 GPU 記憶體大小(以位元組為單位)。 注意 返回的大小不包括 MPSAllocator 記憶體池中的快取分配。 返回型別 int