torch.mps.current_allocated_memory¶ torch.mps.current_allocated_memory()[原始碼][原始碼]¶ 傳回目前 Tensor 佔用的 GPU 記憶體,以位元組為單位。 注意 傳回的大小不包括 MPSAllocator 記憶體池中快取的配置。 傳回類型 int