# Cambricon PyTorch Model Migration Report ## Cambricon PyTorch Changes | No. | File | Description | | 1 | driver.py:3 | add "import torch_mlu" | | 2 | driver.py:53 | change "self.device = torch.device('cuda', self.local_rank)" to "self.device = torch.device('mlu', self.local_rank) " | | 3 | driver.py:162 | change "if torch.cuda.device_count() > 1:" to "if torch.mlu.device_count() > 1: " | | 4 | driver.py:165 | change "torch.distributed.init_process_group(backend="nccl")" to "torch.distributed.init_process_group(backend="cncl") " | | 5 | driver.py:166 | change "torch.cuda.set_device(local_rank)" to "torch.mlu.set_device(local_rank) " | | 6 | lstm.py:1 | add "import torch_mlu" | | 7 | hour_dataset.py:7 | add "import torch_mlu" |