[Qwen4Exp] Restore torch.compile on the NVIDIA path; exact breakable pin; runtime graph-mode assertion

- torch.compile restored on the NVIDIA Qwen4Exp target and MTP so the
  production profile (VLLM_COMPILE + FULL_AND_PIECEWISE, breakable off) runs.
- The production pin requires VLLM_USE_BREAKABLE_CUDAGRAPH to be exactly "0".
- assert_resolved_cudagraph_modes() runs at the top of capture_model.
- CPU tests for the combined profile, the exact pin and the resolved modes.

Co-Authored-By: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-09 19:55:22 +07:00
co-authored by Hinata
parent 23349e43b2
commit 2e68aba2a7
8 changed files with 586 additions and 145 deletions
+6 -3
View File
@@ -106,9 +106,12 @@ DEFAULT_BREAKABLE_CUDAGRAPH_ARCHITECTURES = frozenset(
"KimiLinearForCausalLM",
"MiniMaxM3SparseForCausalLM",
"MiniMaxM3SparseForConditionalGeneration",
"Qwen4ExpForCausalLM",
"Qwen4ExpForConditionalGeneration",
"Qwen4ExpMTP",
# Fork (compile-profile guard): Qwen4ExpForCausalLM,
# Qwen4ExpForConditionalGeneration and Qwen4ExpMTP are deliberately
# NOT here. #55272 added them when it removed torch.compile from the
# NVIDIA path; this tree restores compile, so the resolved profile for
# them is VLLM_COMPILE + FULL_AND_PIECEWISE with breakable capture off
# (vllm/v1/e2_guards.py asserts it at model construction).
}
)