Files
aituner/patches/vllm-0.24.0-opprof/0004-Exclude-OpProf-output-path-from-compile-cache-key.patch
Gahow Wang d5b276180d Add OpProf campaign: protocols, results, patches, run evidence (P0-P6)
Workload-conditioned operator profiling on patched vLLM 0.24.0 +
Qwen3-30B-A3B/H20. H1b PASS (irregular patterns carry +23-45pp R64
raggedness, 8-45% token-efficiency loss vs rectangular controls);
mechanism decomposition kills the padding narrative and finds the
arrival-uniformization artifact (-12.9%); cross-version churn surface
shows TP2/MNS64 -29.4% across vLLM 0.20->0.24 while the argmax held.
Raw Layer-1 JSONL streams (507 MB) stay on disk, git-ignored; footer
sidecars and metrics are tracked.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 11:06:10 +08:00

65 lines
2.2 KiB
Diff

From 335da4abe60e0177872e0b7751e86eeec6756a2b Mon Sep 17 00:00:00 2001
From: Gahow Wang <gahow.wang@gmail.com>
Date: Sat, 11 Jul 2026 22:32:30 +0800
Subject: [PATCH 4/5] Exclude OpProf output path from compile cache key
---
tests/v1/core/test_opprof.py | 21 ++++++++++++++++++++-
vllm/envs.py | 1 +
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/tests/v1/core/test_opprof.py b/tests/v1/core/test_opprof.py
index 79c1fae..a820e7e 100644
--- a/tests/v1/core/test_opprof.py
+++ b/tests/v1/core/test_opprof.py
@@ -8,7 +8,7 @@ import logging
import sys
import threading
from pathlib import Path
-from types import SimpleNamespace
+from types import ModuleType, SimpleNamespace
import msgspec
import pytest
@@ -23,6 +23,25 @@ sys.modules[_SPEC.name] = opprof
_SPEC.loader.exec_module(opprof)
+def test_output_dir_is_not_a_compile_factor(monkeypatch: pytest.MonkeyPatch):
+ spec = importlib.util.spec_from_file_location(
+ "envs_standalone", _ROOT / "vllm" / "envs.py"
+ )
+ assert spec is not None and spec.loader is not None
+ envs = importlib.util.module_from_spec(spec)
+ monkeypatch.setitem(sys.modules, spec.name, envs)
+ spec.loader.exec_module(envs)
+
+ monkeypatch.setitem(sys.modules, "vllm", ModuleType("vllm"))
+ monkeypatch.setitem(sys.modules, "vllm.config", ModuleType("vllm.config"))
+ config_utils = ModuleType("vllm.config.utils")
+ config_utils.__dict__["normalize_value"] = lambda value: value
+ monkeypatch.setitem(sys.modules, "vllm.config.utils", config_utils)
+ monkeypatch.setenv("VLLM_OPPROF_DIR", "/tmp/opprof")
+
+ assert "VLLM_OPPROF_DIR" not in envs.compile_factors()
+
+
class CachedRequests:
def __init__(self, context_ids=()):
self.context_ids = set(context_ids)
diff --git a/vllm/envs.py b/vllm/envs.py
index b3093e9..5634708 100755
--- a/vllm/envs.py
+++ b/vllm/envs.py
@@ -2044,6 +2044,7 @@ def compile_factors() -> dict[str, object]:
"VLLM_LOGGING_CONFIG_PATH",
"VLLM_LOGGING_COLOR",
"VLLM_LOG_STATS_INTERVAL",
+ "VLLM_OPPROF_DIR",
"VLLM_DEBUG_LOG_API_SERVER_RESPONSE",
"VLLM_TUNED_CONFIG_FOLDER",
"VLLM_FLASHINFER_AUTOTUNE_CACHE_DIR",
--
2.43.0