Skip to content

Commit 0af1d8b

Browse files
delete CCL env var setting (#2927)
* delete CCL env var setting * fix format
1 parent d16d737 commit 0af1d8b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/accelerate/state.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,6 @@ def __init__(self, cpu: bool = False, **kwargs):
199199
)
200200
from deepspeed import comm as dist
201201

202-
if is_xpu_available() and is_ccl_available():
203-
os.environ["CCL_PROCESS_LAUNCHER"] = "none"
204-
os.environ["CCL_LOCAL_SIZE"] = os.environ.get("LOCAL_WORLD_SIZE", "1")
205-
os.environ["CCL_LOCAL_RANK"] = os.environ.get("LOCAL_RANK", "0")
206-
207202
if not dist.is_initialized():
208203
dist.init_distributed(dist_backend=self.backend, auto_mpi_discovery=False, **kwargs)
209204
# We need to flag to `use_deepspeed` to be True to override `distributed_type` later
@@ -221,10 +216,6 @@ def __init__(self, cpu: bool = False, **kwargs):
221216
os.environ["WORLD_SIZE"] = str(dist_information.world_size)
222217
os.environ["LOCAL_RANK"] = str(dist_information.local_rank)
223218
os.environ["LOCAL_WORLD_SIZE"] = str(dist_information.local_world_size)
224-
if self.backend == "ccl" and self.distributed_type == DistributedType.MULTI_XPU:
225-
os.environ["CCL_PROCESS_LAUNCHER"] = "none"
226-
os.environ["CCL_LOCAL_SIZE"] = os.environ["LOCAL_WORLD_SIZE"]
227-
os.environ["CCL_LOCAL_RANK"] = os.environ["LOCAL_RANK"]
228219
if not os.environ.get("MASTER_PORT", None):
229220
os.environ["MASTER_PORT"] = "29500"
230221
if (

0 commit comments

Comments
 (0)