torch.mtia.memory.memory_stats¶ torch.mtia.memory.memory_stats(device=None)[source][source]¶ 返回一个字典,包含给定设备的 MTIA 内存分配器统计信息。 参数: device (torch.device, str, 或 int, 可选) – 如果 device 为 None(默认),则表示当前设备,由 current_device()函数提供。 返回类型: dict[str, Any]