@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 70e500cad9
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 15, 18:30 UTC

Fix broken tests (#14713)

Signed-off-by: JovanSardinha <jovan.sardinha@gmail.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>

Jovan Sardinha committed Mar 19, 2025 at 19:06 UTC 70e500cad925499b7d1999c627e35841c937d50a
3 files changed +19 -14
.buildkite/test-pipeline.yaml
+1
@@ -295,6 +295,7 @@ steps:
295 # these tests need to be separated, cannot combine
296 - pytest -v -s compile/piecewise/test_simple.py
297 - pytest -v -s compile/piecewise/test_toy_llama.py
298 + - pytest -v -s compile/test_pass_manager.py
299
300 - label: PyTorch Fullgraph Test # 18min
301 source_file_dependencies:
requirements/test.in
+1 -1
@@ -30,7 +30,7 @@ matplotlib # required for qwen-vl test
30 mistral_common[opencv] >= 1.5.4 # required for pixtral test
31 datamodel_code_generator # required for minicpm3 test
32 lm-eval[api]==0.4.4 # required for model evaluation test
33 -transformers==4.48.2
33 +transformers==4.48.2
34 # quantization
35 bitsandbytes>=0.45.3
36 buildkite-test-collector==0.1.9
tests/compile/test_pass_manager.py
+17 -13
@@ -4,34 +4,38 @@ import pickle
4
5 import pytest
6 import torch
7 -from torch._inductor.codecache import BypassFxGraphCache
7
9 -from vllm.compilation.config import CompilationConfig
10 -from vllm.compilation.inductor_pass import (CallableInductorPass,
11 - as_inductor_pass)
8 +from vllm.compilation.inductor_pass import CallableInductorPass, InductorPass
9 from vllm.compilation.pass_manager import PostGradPassManager
10 +from vllm.config import CompilationConfig
11
12
13 def simple_callable(graph: torch.fx.Graph):
14 pass
15
16
19 -@as_inductor_pass(files=(__file__, ))
20 -def callable_decorated(graph: torch.fx.Graph):
21 - pass
17 +callable_uuid = CallableInductorPass(simple_callable,
18 + InductorPass.hash_source(__file__))
19
20
21 @pytest.mark.parametrize(
22 "works, callable",
26 - [(False, simple_callable), (True, callable_decorated),
27 - (True, CallableInductorPass(simple_callable, "simple_callable"))])
23 + [
24 + (False, simple_callable),
25 + (True, callable_uuid),
26 + (True, CallableInductorPass(simple_callable)),
27 + ],
28 +)
29 def test_pass_manager(works: bool, callable):
30 config = CompilationConfig().pass_config
30 - pass_manager = PostGradPassManager([callable])
31 - pass_manager.configure(config) # Adds default passes
31
32 + pass_manager = PostGradPassManager()
33 + pass_manager.configure(config)
34 +
35 + # Try to add the callable to the pass manager
36 if works:
37 + pass_manager.add(callable)
38 pickle.dumps(pass_manager)
39 else:
36 - with pytest.raises(BypassFxGraphCache):
37 - pickle.dumps(pass_manager)
40 + with pytest.raises(AssertionError):
41 + pass_manager.add(callable)