评价此页

torch.get_device_module#

torch.get_device_module(device=None)[source]#

返回与给定设备(例如 torch.device(‘cuda’)、“mtia:0”、“xpu” 等)关联的模块。如果未提供设备,则返回当前加速器或 CPU 的模块(如果存在)。