[ROCm][CI] Fix MEGA_AOT_ARTIFACT fallback when PyTorch < 2.10.0 lacks AOT support (#37763)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Andreas Karatzas
2026-03-22 03:02:03 -05:00
committed by GitHub
parent b050700462
commit 3b06c55c78

View File

@@ -15,6 +15,7 @@ from torch._dynamo.utils import counters
import vllm.envs as envs
from vllm.compilation.counter import compilation_counter
from vllm.config import CompilationConfig, CompilationMode, CUDAGraphMode
from vllm.utils.torch_utils import is_torch_equal_or_newer
from ..utils import fork_new_process_for_each_test
@@ -71,7 +72,10 @@ def test_moe_startup(monkeypatch, vllm_runner, fresh_vllm_cache, mega_aot_artifa
num_compiled_artifacts_saved=0,
):
_run_vllm(vllm_runner)
if envs.VLLM_USE_MEGA_AOT_ARTIFACT:
mega_aot_active = envs.VLLM_USE_MEGA_AOT_ARTIFACT and is_torch_equal_or_newer(
"2.10.0"
)
if mega_aot_active:
# MEGA_AOT_ARTIFACT is enabled, so we expect no aot_autograd running on
# subgraphs.
assert counters["aot_autograd"]["total"] == 0