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

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 7, 19:00 UTC

[Bugfix][CPU] Fix basic unit tests failing in CPU platforms (#34677)

Signed-off-by: Yanwen Lin <lyw1124278064@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Yanwen Lin committed Feb 25, 2026 at 00:36 UTC 675ec59aa94301989c3c174b3b910338c2d51ff4
1 file changed +15 -6
tests/test_config.py
+15 -6
@@ -926,12 +926,17 @@ def test_vllm_config_defaults(model_id, compiliation_config, optimization_level)
926 # Verify other compilation_config defaults
927 compilation_config_dict = default_config["compilation_config"]
928 for k, v in compilation_config_dict.items():
929 - if k != "pass_config":
930 - actual = getattr(vllm_config.compilation_config, k)
931 - expected = v(vllm_config) if callable(v) else v
932 - assert actual == expected, (
933 - f"compilation_config.{k}: expected {expected}, got {actual}"
934 - )
929 + if k == "pass_config":
930 + continue
931 + actual = getattr(vllm_config.compilation_config, k)
932 + expected = v(vllm_config) if callable(v) else v
933 + # On platforms without static graph support, __post_init__ forces
934 + # cudagraph_mode to NONE; expect that instead of the level default.
935 + if k == "cudagraph_mode" and not current_platform.support_static_graph_mode():
936 + expected = CUDAGraphMode.NONE
937 + assert actual == expected, (
938 + f"compilation_config.{k}: expected {expected}, got {actual}"
939 + )
940
941
942 def test_vllm_config_callable_defaults():
@@ -969,6 +974,10 @@ def test_vllm_config_callable_defaults():
974 assert enable_if_sequential(config_quantized) is True
975
976
977 +@pytest.mark.skipif(
978 + not current_platform.support_static_graph_mode(),
979 + reason="Explicit overrides may be force-overwritten without static graph support.",
980 +)
981 def test_vllm_config_explicit_overrides():
982 """Test that explicit property overrides work correctly with callable defaults.
983