diff --git a/src/accelerate/state.py b/src/accelerate/state.py index ec1a5b19c4b..90f2b057036 100644 --- a/src/accelerate/state.py +++ b/src/accelerate/state.py @@ -193,7 +193,7 @@ def __init__(self, cpu: bool = False, **kwargs): ) from deepspeed import comm as dist - if is_xpu_available and is_ccl_available(): + if is_xpu_available() and is_ccl_available(): os.environ["CCL_PROCESS_LAUNCHER"] = "none" os.environ["CCL_LOCAL_SIZE"] = os.environ.get("LOCAL_WORLD_SIZE", "1") os.environ["CCL_LOCAL_RANK"] = os.environ.get("LOCAL_RANK", "0")