torch.mps.current_allocated_memory¶ torch.mps.current_allocated_memory()[源代码]¶ 返回当前由张量占用的GPU内存,以字节为单位。 注意 返回的大小不包括在 MPSAllocator 内存池中的缓存分配。 Return type int