Skip to content

Commit f81c37f

Browse files
ruisearch42Akshat-Tripathi
authored andcommitted
[misc] Rename Ray ADAG to Compiled Graph (vllm-project#13928)
1 parent 258b598 commit f81c37f

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

tests/basic_correctness/test_basic_correctness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_models_distributed(
117117
pytest.skip(f"Skip test for {test_suite}")
118118

119119
if model == "meta-llama/Llama-3.2-1B-Instruct" and distributed_executor_backend == "ray" and attention_backend == "" and test_suite == "L4": # noqa
120-
# test ray adag
120+
# test Ray Compiled Graph
121121
os.environ['VLLM_USE_RAY_SPMD_WORKER'] = "1"
122122
os.environ['VLLM_USE_RAY_COMPILED_DAG'] = "1"
123123

tests/basic_correctness/test_chunked_prefill.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def test_models_distributed(
9393

9494
if (model == "meta-llama/Llama-3.2-1B-Instruct"
9595
and distributed_executor_backend == "ray"):
96-
# test ray adag
96+
# test Ray Compiled Graph
9797
os.environ['VLLM_USE_RAY_SPMD_WORKER'] = "1"
9898
os.environ['VLLM_USE_RAY_COMPILED_DAG'] = "1"
9999

tests/distributed/test_pipeline_parallel.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,16 @@ def _compare_tp(
324324
specific_case = tp_size == 2 and pp_size == 2 and chunked_prefill
325325
if distributed_backend == "ray" and (vllm_major_version == "1"
326326
or specific_case):
327-
# For V1, test Ray ADAG for all the tests
328-
# For V0, test Ray ADAG for a subset of the tests
327+
# For V1, test Ray Compiled Graph for all the tests
328+
# For V0, test Ray Compiled Graph for a subset of the tests
329329
pp_env = {
330330
"VLLM_USE_V1": vllm_major_version,
331331
"VLLM_USE_RAY_COMPILED_DAG": "1",
332332
"VLLM_USE_RAY_SPMD_WORKER": "1",
333333
"VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL": "1",
334334
}
335335
# Temporary. Currently when zeromq + SPMD is used, it does not properly
336-
# terminate because of aDAG issue.
336+
# terminate because of a Ray Compiled Graph issue.
337337
common_args.append("--disable-frontend-multiprocessing")
338338
else:
339339
pp_env = None
@@ -367,8 +367,9 @@ def _compare_tp(
367367
if pp_env is None:
368368
raise
369369
else:
370-
# Ray ADAG tests are flaky, so we don't want to fail the test
371-
logger.exception("Ray ADAG tests failed")
370+
# Ray Compiled Graph tests are flaky,
371+
# so we don't want to fail the test
372+
logger.exception("Ray Compiled Graph tests failed")
372373

373374

374375
@pytest.mark.parametrize(

vllm/envs.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,21 +371,22 @@ def maybe_convert_int(value: Optional[str]) -> Optional[int]:
371371
"VLLM_USE_RAY_SPMD_WORKER":
372372
lambda: bool(int(os.getenv("VLLM_USE_RAY_SPMD_WORKER", "0"))),
373373

374-
# If the env var is set, it uses the Ray's compiled DAG API
375-
# which optimizes the control plane overhead.
374+
# If the env var is set, it uses the Ray's Compiled Graph
375+
# (previously known as ADAG) API which optimizes the
376+
# control plane overhead.
376377
# Run vLLM with VLLM_USE_RAY_COMPILED_DAG=1 to enable it.
377378
"VLLM_USE_RAY_COMPILED_DAG":
378379
lambda: bool(int(os.getenv("VLLM_USE_RAY_COMPILED_DAG", "0"))),
379380

380381
# If the env var is set, it uses NCCL for communication in
381-
# Ray's compiled DAG. This flag is ignored if
382+
# Ray's Compiled Graph. This flag is ignored if
382383
# VLLM_USE_RAY_COMPILED_DAG is not set.
383384
"VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL":
384385
lambda: bool(int(os.getenv("VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL", "1"))
385386
),
386387

387388
# If the env var is set, it enables GPU communication overlap
388-
# (experimental feature) in Ray's compiled DAG. This flag is ignored if
389+
# (experimental feature) in Ray's Compiled Graph. This flag is ignored if
389390
# VLLM_USE_RAY_COMPILED_DAG is not set.
390391
"VLLM_USE_RAY_COMPILED_DAG_OVERLAP_COMM":
391392
lambda: bool(int(os.getenv("VLLM_USE_RAY_COMPILED_DAG_OVERLAP_COMM", "0"))

vllm/executor/ray_distributed_executor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def _wait_for_tasks_completion(self, parallel_worker_tasks: Any) -> None:
491491
async_run_remote_workers_only to complete."""
492492
ray.get(parallel_worker_tasks)
493493

494-
def _check_ray_adag_installation(self):
494+
def _check_ray_cgraph_installation(self):
495495
import pkg_resources
496496
from packaging import version
497497

@@ -503,10 +503,10 @@ def _check_ray_adag_installation(self):
503503
f"required, but found {current_version}")
504504

505505
import importlib.util
506-
adag_spec = importlib.util.find_spec(
506+
cgraph_spec = importlib.util.find_spec(
507507
"ray.experimental.compiled_dag_ref")
508-
if adag_spec is None:
509-
raise ValueError("Ray accelerated DAG is not installed. "
508+
if cgraph_spec is None:
509+
raise ValueError("Ray Compiled Graph is not installed. "
510510
"Run `pip install ray[adag]` to install it.")
511511

512512
cupy_spec = importlib.util.find_spec("cupy")
@@ -518,7 +518,7 @@ def _check_ray_adag_installation(self):
518518

519519
def _compiled_ray_dag(self, enable_asyncio: bool):
520520
assert self.parallel_config.use_ray
521-
self._check_ray_adag_installation()
521+
self._check_ray_cgraph_installation()
522522
from ray.dag import InputNode, MultiOutputNode
523523
from ray.experimental.channel.torch_tensor_type import TorchTensorType
524524

vllm/executor/ray_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def execute_model_spmd(
8383

8484
execute_model_req = self.input_decoder.decode(serialized_req)
8585

86-
# TODO(swang): This is needed right now because Ray aDAG executes
87-
# on a background thread, so we need to reset torch's current
88-
# device.
86+
# TODO(swang): This is needed right now because Ray Compiled Graph
87+
# executes on a background thread, so we need to reset torch's
88+
# current device.
8989
import torch
9090
if not self.compiled_dag_cuda_device_set:
9191
torch.cuda.set_device(self.worker.device)
@@ -119,7 +119,7 @@ def execute_model_ray(
119119
"IntermediateTensors"]],
120120
) -> Union["ModelRunnerOutput", Tuple["SchedulerOutput",
121121
"IntermediateTensors"]]:
122-
# this method is used to compile ray CG,
122+
# This method is used by Ray Compiled Graph to execute the model,
123123
# and it needs a special logic of self.setup_device_if_necessary()
124124
self.setup_device_if_necessary()
125125
assert self.worker is not None, "Worker is not initialized"

0 commit comments

Comments
 (0)