@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3501324957
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

[Build] fix self-contradictory precompiled-flag orthogonality test (#44942)

Signed-off-by: pjdurden <prajjwalchittori1@gmail.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>

Prajjwal Chittori committed Jun 11, 2026 at 10:19 UTC 3501324957a1edf221187e2da3db09edd338815a
2 files changed +21 -2
.buildkite/test_areas/misc.yaml
+2
@@ -293,6 +293,7 @@ steps:
293 - vllm/transformers_utils/
294 - vllm/utils/
295 - vllm/v1/
296 + - tests/test_envs.py
297 - tests/test_inputs.py
298 - tests/test_outputs.py
299 - tests/test_pooling_params.py
@@ -309,6 +310,7 @@ steps:
310 device: cpu-small
311 commands:
312 - python3 standalone_tests/lazy_imports.py
313 + - pytest -v -s test_envs.py
314 - pytest -v -s test_inputs.py
315 - pytest -v -s test_outputs.py
316 - pytest -v -s test_pooling_params.py
tests/test_envs.py
+19 -2
@@ -104,15 +104,32 @@ def test_is_envs_cache_enabled() -> None:
104
105
106 def test_precompiled_install_flags_are_orthogonal() -> None:
107 + # The Rust frontend flag is independent of the C-extension precompiled
108 + # flag: requesting the precompiled Rust frontend must not implicitly
109 + # enable the precompiled C extensions.
110 + with patch.dict(os.environ, {"VLLM_USE_PRECOMPILED_RUST": "1"}, clear=True):
111 + assert environment_variables["VLLM_USE_PRECOMPILED"]() is False
112 + assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
113 +
114 + # ...and the reverse: requesting precompiled C extensions (here via a
115 + # wheel location, which enables VLLM_USE_PRECOMPILED) must not flip the
116 + # Rust frontend flag.
117 + with patch.dict(
118 + os.environ, {"VLLM_PRECOMPILED_WHEEL_LOCATION": "/tmp/vllm.whl"}, clear=True
119 + ):
120 + assert environment_variables["VLLM_USE_PRECOMPILED"]() is True
121 + assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is False
122 +
123 + # ...and with both set together, each flag is still parsed independently.
124 with patch.dict(
125 os.environ,
126 {
127 "VLLM_PRECOMPILED_WHEEL_LOCATION": "/tmp/vllm.whl",
128 "VLLM_USE_PRECOMPILED_RUST": "1",
129 },
113 - clear=False,
130 + clear=True,
131 ):
115 - assert environment_variables["VLLM_USE_PRECOMPILED"]() is False
132 + assert environment_variables["VLLM_USE_PRECOMPILED"]() is True
133 assert environment_variables["VLLM_USE_PRECOMPILED_RUST"]() is True
134
135