torch.mtia.set_device¶ torch.mtia.set_device(device)[源代码][源代码]¶ 设置当前设备。 参数 device (torch.device 或 int) – 选择的设备。如果此参数为负数,则此函数不执行任何操作。