torch.mtia.set_device¶ torch.mtia.set_device(device)[source][source]¶ 设置当前设备。 参数: 设备(torch.device 或 int)- 选择设备。如果此参数为负,则此函数为空操作。