[Frontend][RFC] Rust front-end integration (#40848)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
Nick Hill
2026-05-21 12:24:48 +08:00
committed by GitHub
co-authored by Bugen Zhao
parent d97ba29fdc
commit f2ace1d57d
35 changed files with 893 additions and 91 deletions
@@ -299,22 +299,16 @@ async def test_abort_timeout_exits_quickly(wait_for_engine_idle: float):
start_time = time.time()
proc.send_signal(signal.SIGTERM)
# abort timeout (0) should stop the server promptly. On ROCm, process
# exit can spend extra time in HIP/RCCL/native extension teardown after
# the server and engine have already shut down.
max_exit_time = 4.0 if _IS_ROCM else 2.1
# abort timeout (0) should stop the server promptly.
try:
proc.wait(timeout=max_exit_time)
proc.wait(timeout=4.0)
except subprocess.TimeoutExpired:
proc.kill()
proc.wait(timeout=5)
pytest.fail("Process did not exit after SIGTERM with abort timeout")
exit_time = time.time() - start_time
assert exit_time < max_exit_time, (
f"Default shutdown took too long: {exit_time:.1f}s"
)
assert exit_time < 4.1, f"Default shutdown took too long: {exit_time:.1f}s"
assert proc.returncode in (0, -15, None), f"Unexpected: {proc.returncode}"
await _assert_children_cleaned_up(child_pids)
+13
View File
@@ -103,6 +103,19 @@ def test_is_envs_cache_enabled() -> None:
assert not envs._is_envs_cache_enabled()
def test_precompiled_install_flags_are_orthogonal() -> None:
with patch.dict(
os.environ,
{
"VLLM_PRECOMPILED_WHEEL_LOCATION": "/tmp/vllm.whl",
"VLLM_USE_PRECOMPILED_RUST": "1",
},
clear=False,
):
assert environment_variables["VLLM_USE_PRECOMPILED"]() is False
assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
class TestEnvWithChoices:
"""Test cases for env_with_choices function."""