diff --git a/lmdeploy/pytorch/engine/executor/ray_executor.py b/lmdeploy/pytorch/engine/executor/ray_executor.py index 47a72a5243..5fef3dca11 100644 --- a/lmdeploy/pytorch/engine/executor/ray_executor.py +++ b/lmdeploy/pytorch/engine/executor/ray_executor.py @@ -687,7 +687,7 @@ def _init_ascend_distributed_environment(self, driver_ip): # Single-node PG below. if 'ASCEND_RT_VISIBLE_DEVICES' in os.environ: - ray.get([w.set_device.remote(idx) for idx, w in enumerate(self.workers)]) + ray.get([w.set_device.remote(idx + self.rank_offset) for idx, w in enumerate(self.workers)]) else: local_npu_count = torch.npu.device_count() if local_npu_count <= 0: