评价此页

torch.mtia.memory.memory_allocated#

torch.mtia.memory.memory_allocated(device=None)[source]#

返回给定设备上张量当前占用的 MTIA 内存(以字节为单位)。

参数

device (torch.deviceintstr, 可选) – 选定的设备。如果 deviceNone(默认),则返回 current_device() 指定的当前设备的统计信息。

返回类型

int