diff --git a/src/accelerate/utils/constants.py b/src/accelerate/utils/constants.py
index 934923bef..f31027ee1 100644
--- a/src/accelerate/utils/constants.py
+++ b/src/accelerate/utils/constants.py
@@ -58,3 +58,5 @@
     "master_addr",
     "master_port",
 ]
+
+CUDA_DISTRIBUTED_TYPES = ["DEEPSPEED", "MULTI_GPU", "FSDP", "MEGATRON_LM"]
diff --git a/src/accelerate/utils/operations.py b/src/accelerate/utils/operations.py
index aef1fd589..7ba4482cc 100644
--- a/src/accelerate/utils/operations.py
+++ b/src/accelerate/utils/operations.py
@@ -24,6 +24,7 @@
 from torch.distributed import ReduceOp
 
 from ..state import AcceleratorState
+from .constants import CUDA_DISTRIBUTED_TYPES
 from .dataclasses import DistributedType, TensorInformation
 from .imports import is_tpu_available
 from .versions import is_torch_version
@@ -220,12 +221,7 @@ def gather(tensor):
     """
     if AcceleratorState().distributed_type == DistributedType.TPU:
         return _tpu_gather(tensor, name="accelerate.utils.gather")
-    elif AcceleratorState().distributed_type in [
-        DistributedType.DEEPSPEED,
-        DistributedType.MULTI_GPU,
-        DistributedType.FSDP,
-        DistributedType.MEGATRON_LM,
-    ]:
+    elif AcceleratorState().distributed_type in CUDA_DISTRIBUTED_TYPES:
         return _gpu_gather(tensor)
     elif AcceleratorState().distributed_type == DistributedType.MULTI_CPU:
         return _cpu_gather(tensor)
@@ -258,12 +254,7 @@ def gather_object(object: Any):
     """
     if AcceleratorState().distributed_type == DistributedType.TPU:
         raise NotImplementedError("gather objects in TPU is not supported")
-    elif AcceleratorState().distributed_type in [
-        DistributedType.DEEPSPEED,
-        DistributedType.MULTI_GPU,
-        DistributedType.FSDP,
-        DistributedType.MEGATRON_LM,
-    ]:
+    elif AcceleratorState().distributed_type in CUDA_DISTRIBUTED_TYPES:
         return _gpu_gather_object(object)
     elif AcceleratorState().distributed_type == DistributedType.MULTI_CPU:
         return _cpu_gather_object(object)
@@ -302,12 +293,7 @@ def broadcast(tensor, from_process: int = 0):
     """
     if AcceleratorState().distributed_type == DistributedType.TPU:
         return _tpu_broadcast(tensor, src=from_process, name="accelerate.utils.broadcast")
-    elif AcceleratorState().distributed_type in [
-        DistributedType.DEEPSPEED,
-        DistributedType.MULTI_GPU,
-        DistributedType.FSDP,
-        DistributedType.MEGATRON_LM,
-    ]:
+    elif AcceleratorState().distributed_type in CUDA_DISTRIBUTED_TYPES:
         return _gpu_broadcast(tensor, src=from_process)
     elif AcceleratorState().distributed_type == DistributedType.MULTI_CPU:
         return _gpu_broadcast(tensor, src=from_process)
@@ -331,12 +317,7 @@ def broadcast_object_list(object_list, from_process: int = 0):
     if AcceleratorState().distributed_type == DistributedType.TPU:
         for i, obj in enumerate(object_list):
             object_list[i] = xm.mesh_reduce("accelerate.utils.broadcast_object_list", obj, lambda x: x[from_process])
-    elif AcceleratorState().distributed_type in [
-        DistributedType.DEEPSPEED,
-        DistributedType.MULTI_GPU,
-        DistributedType.FSDP,
-        DistributedType.MEGATRON_LM,
-    ]:
+    elif AcceleratorState().distributed_type in CUDA_DISTRIBUTED_TYPES:
         torch.distributed.broadcast_object_list(object_list, src=from_process)
     elif AcceleratorState().distributed_type == DistributedType.MULTI_CPU:
         torch.distributed.broadcast_object_list(object_list, src=from_process)
@@ -452,12 +433,7 @@ def _reduce_across_processes(tensor, reduction="mean"):
         if state.distributed_type == DistributedType.TPU:
             xm.all_reduce("sum", cloned_tensor)
             return cloned_tensor
-        elif state.distributed_type in [
-            DistributedType.DEEPSPEED,
-            DistributedType.MULTI_GPU,
-            DistributedType.FSDP,
-            DistributedType.MEGATRON_LM,
-        ]:
+        elif state.distributed_type.value in CUDA_DISTRIBUTED_TYPES:
             torch.distributed.all_reduce(cloned_tensor, ReduceOp.SUM)
             return cloned_tensor
         else:
diff --git a/src/accelerate/utils/random.py b/src/accelerate/utils/random.py
index 8dc149a02..01c4df2af 100644
--- a/src/accelerate/utils/random.py
+++ b/src/accelerate/utils/random.py
@@ -19,6 +19,7 @@
 import torch
 
 from ..state import AcceleratorState
+from .constants import CUDA_DISTRIBUTED_TYPES
 from .dataclasses import DistributedType, RNGType
 from .imports import is_tpu_available
 
@@ -64,12 +65,7 @@ def synchronize_rng_state(rng_type: Optional[RNGType] = None, generator: Optiona
     state = AcceleratorState()
     if state.distributed_type == DistributedType.TPU:
         rng_state = xm.mesh_reduce("random_seed", rng_state, lambda x: x[0])
-    elif state.distributed_type in [
-        DistributedType.DEEPSPEED,
-        DistributedType.MULTI_GPU,
-        DistributedType.FSDP,
-        DistributedType.MEGATRON_LM,
-    ]:
+    elif state.distributed_type in CUDA_DISTRIBUTED_TYPES:
         rng_state = rng_state.to(state.device)
         torch.distributed.broadcast(rng_state, 0)
         rng_state = rng_state.cpu()



Discussion: body: _The documentation is not available anymore as the PR was closed or merged._