torch.get_device_module¶ torch.get_device_module(device=None)[source][source]¶ 返回与指定设备关联的模块(例如,torch.device(‘cuda’), “mtia:0”, “xpu”,…)。如果没有指定设备,则返回当前加速器或不存在时返回 CPU 的模块。