A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 17, 04:15 UTC
[Minor] Small fix to make distributed init logic in worker looks cleaner (#2905)
Zhuohan Li committed
Feb 18, 2024 at 14:39 UTC
537c9755a736b4e206107a99e1c8961448a3d63b
1 file changed
+4
-2
vllm/worker/worker.py
+4
-2
@@ -93,8 +93,6 @@ class Worker:
93
# Initialize the distributed environment.
94
init_distributed_environment(self.parallel_config, self.rank,
95
cupy_port, self.distributed_init_method)
96
- if not self.parallel_config.disable_custom_all_reduce:
97
- init_custom_ar()
96
# Initialize the model.
97
set_random_seed(self.model_config.seed)
98
@@ -288,6 +286,10 @@ def init_distributed_environment(
286
ensure_model_parallel_initialized(parallel_config.tensor_parallel_size,
287
parallel_config.pipeline_parallel_size)
288
289
+ # Initialize a custom fast all-reduce implementation.
290
+ if not parallel_config.disable_custom_all_reduce:
291
+ init_custom_ar()
292
+
293
294
def _check_if_gpu_supports_dtype(torch_dtype: torch.dtype):
295
# Check if the GPU supports the dtype.