Skip to content

Commit 2ab9b16

Browse files
authored
[Fix] Add warning for incompatible Ray backend with ACL Graph mode (#1501)
### What this PR does / why we need it? Currently, Ray is not compatible with ACL Graph, so we need to fall back to eager mode when using the Ray backend. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? --------- Signed-off-by: Yizhou Liu <liu_yizhou@outlook.com>
1 parent da2d5ac commit 2ab9b16

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/singlecard/test_aclgraph.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,16 @@ def test_deepseek_raises_error(monkeypatch: pytest.MonkeyPatch) -> None:
103103
max_model_len=1024,
104104
enforce_eager=False)
105105
assert "ACL Graph does not support deepseek" in str(excinfo.value)
106+
107+
108+
@pytest.mark.skipif(os.getenv("VLLM_USE_V1") == "0",
109+
reason="aclgraph only support on v1")
110+
@pytest.mark.parametrize("model", MODELS)
111+
def test_ray_backend_sets_no_compilation(
112+
model: str, monkeypatch: pytest.MonkeyPatch) -> None:
113+
with monkeypatch.context() as m:
114+
m.setenv("VLLM_USE_V1", "1")
115+
runner = VllmRunner(model,
116+
enforce_eager=False,
117+
distributed_executor_backend="ray")
118+
assert runner.model.llm_engine.vllm_config.compilation_config.level == 0

vllm_ascend/platform.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
157157
"Torchair compilation enabled on NPU. Setting level to NO_COMPILATION"
158158
)
159159
compilation_config.level = CompilationLevel.NO_COMPILATION
160+
elif parallel_config.distributed_executor_backend == "ray":
161+
logger.warning(
162+
"Ray distributed executor backend is not compatible with ACL Graph mode "
163+
"right now. Setting level to NO_COMPILATION")
164+
compilation_config.level = CompilationLevel.NO_COMPILATION
160165
else:
161166
logger.info(
162167
"PIECEWISE compilation enabled on NPU. use_inductor not supported - "

0 commit comments

Comments
 (0)