servediff 0.3.7__tar.gz → 0.3.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {servediff-0.3.7 → servediff-0.3.8}/CHANGELOG.md +10 -0
  2. {servediff-0.3.7 → servediff-0.3.8}/PKG-INFO +61 -4
  3. {servediff-0.3.7 → servediff-0.3.8}/README.md +60 -3
  4. {servediff-0.3.7 → servediff-0.3.8}/pyproject.toml +1 -1
  5. {servediff-0.3.7 → servediff-0.3.8}/src/servediff/cli.py +58 -3
  6. {servediff-0.3.7 → servediff-0.3.8}/src/servediff.egg-info/PKG-INFO +61 -4
  7. {servediff-0.3.7 → servediff-0.3.8}/tests/test_cli.py +38 -0
  8. {servediff-0.3.7 → servediff-0.3.8}/CONTRIBUTING.md +0 -0
  9. {servediff-0.3.7 → servediff-0.3.8}/LICENSE +0 -0
  10. {servediff-0.3.7 → servediff-0.3.8}/MANIFEST.in +0 -0
  11. {servediff-0.3.7 → servediff-0.3.8}/README.zh-CN.md +0 -0
  12. {servediff-0.3.7 → servediff-0.3.8}/examples/issue-excerpts/vllm-47047-v0.23-default.log +0 -0
  13. {servediff-0.3.7 → servediff-0.3.8}/examples/issue-excerpts/vllm-47047-v0.23-marlin.log +0 -0
  14. {servediff-0.3.7 → servediff-0.3.8}/examples/issue-excerpts/vllm-53472-v0.23.log +0 -0
  15. {servediff-0.3.7 → servediff-0.3.8}/examples/issue-excerpts/vllm-53472-v0.26-flag.log +0 -0
  16. {servediff-0.3.7 → servediff-0.3.8}/examples/issue-excerpts/vllm-53472-v0.26.log +0 -0
  17. {servediff-0.3.7 → servediff-0.3.8}/setup.cfg +0 -0
  18. {servediff-0.3.7 → servediff-0.3.8}/src/servediff/__init__.py +0 -0
  19. {servediff-0.3.7 → servediff-0.3.8}/src/servediff/__main__.py +0 -0
  20. {servediff-0.3.7 → servediff-0.3.8}/src/servediff/env.py +0 -0
  21. {servediff-0.3.7 → servediff-0.3.8}/src/servediff.egg-info/SOURCES.txt +0 -0
  22. {servediff-0.3.7 → servediff-0.3.8}/src/servediff.egg-info/dependency_links.txt +0 -0
  23. {servediff-0.3.7 → servediff-0.3.8}/src/servediff.egg-info/entry_points.txt +0 -0
  24. {servediff-0.3.7 → servediff-0.3.8}/src/servediff.egg-info/requires.txt +0 -0
  25. {servediff-0.3.7 → servediff-0.3.8}/src/servediff.egg-info/top_level.txt +0 -0
  26. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/README.md +0 -0
  27. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/sglang-0.4.4-tp4.log +0 -0
  28. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/vllm-0.23.1-tp8-allreduce.log +0 -0
  29. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/vllm-47047-v0.23-default.log +0 -0
  30. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/vllm-47047-v0.23-marlin.log +0 -0
  31. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/vllm-53472-v0.23.log +0 -0
  32. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/vllm-53472-v0.26-flag.log +0 -0
  33. {servediff-0.3.7 → servediff-0.3.8}/tests/fixtures/vllm-53472-v0.26.log +0 -0
  34. {servediff-0.3.7 → servediff-0.3.8}/tests/test_env.py +0 -0
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.8 — 2026-11-06
4
+
5
+ - `diff` now names why a fact could not be observed, for the two cases the tool can
6
+ actually tell: a single-rank log (`world_size=1`, so no all-reduce group exists and
7
+ no backend is chosen) and a v0.29.0+ log whose FlashInfer auto-selection fact is
8
+ missing because that line is logged at DEBUG. Previously a fact absent from *both*
9
+ logs produced no row at all and was silently counted as identical, which let
10
+ "nothing could be seen" read as "nothing changed". Reported in text, JSON (`notes`)
11
+ and `--markdown` output.
12
+
3
13
  ## 0.3.7 — 2026-11-05
4
14
 
5
15
  - Extract the all-reduce backend selection from TP startup logs: the chosen
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: servediff
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: Diff what your vLLM / SGLang server actually ran with: auto-selected backends, CUDA graphs, startup failures, dependency versions.
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/apex-mochen/servediff
@@ -117,6 +117,62 @@ compile.fusions allreduce_rms
117
117
  startup failed
118
118
  ```
119
119
 
120
+ ### When the all-reduce path changes silently
121
+
122
+ vLLM chooses an all-reduce implementation per TP group out of a candidate list, and
123
+ FlashInfer can pick its own backend on top of that. These lines are printed once at
124
+ startup and never mentioned again — which is how a version bump can move decode
125
+ through a different communication path without any flag changing. Since 0.3.7 they
126
+ are facts (this is `servediff show` on the same v0.23.1 TP=8 log):
127
+
128
+ ```text
129
+ backend.allreduce_dispatch tp:0: ['CUSTOM', 'SYMM_MEM', 'PYNCCL'] line 37
130
+ backend.allreduce_flashinfer mnnvl line 102
131
+ backend.allreduce_fusion ["norm: mnnvl", "norm quantization: trtllm"] line 106
132
+ backend.allreduce_potential ['NCCL_SYMM_MEM', 'QUICK_REDUCE', 'FLASHINFER', 'AITER_CU... line 37
133
+ model_runner V2 line 39
134
+ ```
135
+
136
+ The first two separate *chosen* from *possible*: FlashInfer sitting in `potential`
137
+ but not in `dispatch` means it was not used for that group. The last two record
138
+ whether FlashInfer's fused workspaces were actually built, but read their absence
139
+ carefully: since 0.29.0 the FlashInfer auto-selection line is logged at DEBUG
140
+ (`debug_once`), so on a default INFO log it may simply not have been printed. The
141
+ `all-reduce backends (in dispatch order)` line is `info_once` in 0.29.0, which makes
142
+ the dispatch chain the reliable cross-version signal. `model_runner` covers V1 vs V2
143
+ (so `VLLM_USE_V2_MODEL_RUNNER=0` runs are identifiable), and `compile.fusions` carries
144
+ `allreduce_rms` when `fuse_allreduce_rms` is on.
145
+
146
+ A fact missing from *both* logs leaves no diff row at all, so it would otherwise be
147
+ counted as "identical" without ever being compared. Since 0.3.8 `diff` names the reason
148
+ where it can tell, instead of leaving that to the reader:
149
+
150
+ ```text
151
+ > ℹ️ baseline: no all-reduce facts: world_size=1, so there is no all-reduce group and
152
+ no backend is chosen; a TP>1 run is what makes this path observable
153
+ ```
154
+
155
+ That note is what separates *nothing changed* from *nothing could be seen*: on a TP=1
156
+ log the all-reduce path does not exist to compare, and a TP>1 log that begins after
157
+ engine init never printed the selection. The same mechanism flags a 0.29+ log whose
158
+ FlashInfer fact is missing because the line is DEBUG-only.
159
+
160
+ That makes the question raised in
161
+ [vllm#63705](https://github.com/vllm-project/vllm/issues/63705) — *did 0.29 turn
162
+ FlashInfer all-reduce on by default (#52998)?* — answerable from logs you already
163
+ keep, one per version, same TP:
164
+
165
+ ```bash
166
+ servediff diff v0.28.log v0.29.log
167
+ ```
168
+
169
+ On a real 4×H100 TP4+EP node (MiniMax-M2.7, one run per version) that is exactly what
170
+ the diff showed between v0.26.0 and v0.29.0: the TP group chain went from `['PYNCCL']`
171
+ to `['FLASHINFER', 'PYNCCL']` while the EP group stayed `['PYNCCL']`, V2 Model Runner
172
+ appeared, and `allreduce_rms` was off in both runs — so the two changed defaults are
173
+ the TP-side FlashInfer path and the model runner ([reported
174
+ here](https://github.com/vllm-project/vllm/issues/63705#issuecomment-6656162111)).
175
+
120
176
  So a TP4+EP comparison (like the one in the
121
177
  [#63705 analysis](https://github.com/apex-mochen/servediff/blob/main/ISSUE-63705-analysis.md)
122
178
  — a decode-only regression across vLLM 0.29–0.32) can be scripted as:
@@ -172,6 +228,7 @@ contains `TOKEN`, `KEY`, `SECRET`, `PASSWORD`, `CREDENTIAL` or `AUTH` are replac
172
228
  | MoE backend | three log formats seen in 0.23–0.30 | `moe_runner_backend` arg |
173
229
  | CUDA graph | eager mode, `cudagraph_mode`, capture sets, pool size | prefill CUDA graph disabled |
174
230
  | model runner, UVA fallback | `Using V2 Model Runner`; V1 runner detected via `gpu_model_runner.py` module; pinned-memory fallback | — |
231
+ | all-reduce path | chosen chain per TP group + candidate pool (`all-reduce backends (in dispatch order) … out of potential backends`), FlashInfer's auto-selected backend and its norm / norm-quantization fusion workspaces (0.3.7+) | — |
175
232
  | parallel config | `world_size`, DP/PP/PCP/TP/ETP/EP/EPLB role assignment | — |
176
233
  | KV cache layout | `Using LBNHC KV cache layout` (0.30+) | — |
177
234
  | model loading | `Model loading took … GiB memory and … seconds` | — |
@@ -216,9 +273,9 @@ Exit codes: `0` no differences, `1` differences, `2` nothing recognised.
216
273
  a real TP=8 startup log from vllm#48591 (v0.23.1, one line per worker + role
217
274
  assignment); a real SGLang startup log from sgl-project/sglang#4862 (v0.4.4, TP=4,
218
275
  Qwen2.5-Omni-7B — `server_args=ServerArgs(...)` keyword-call form parsed, startup
219
- failure + root-cause error recorded). The parallel-config rules cover TP>1 real
220
- logs; MoE models in full logs, recent SGLang versions and other engines are not
221
- yet verified.
276
+ failure + root-cause error recorded). The parallel-config and all-reduce rules are
277
+ checked against real TP>1 logs; MoE models in full logs, recent SGLang versions and
278
+ other engines are not yet verified.
222
279
  - Parsing is regex-based on log text, which changes between versions. A missed line
223
280
  shows up as `<absent>`, never as a wrong value — please report it.
224
281
 
@@ -96,6 +96,62 @@ compile.fusions allreduce_rms
96
96
  startup failed
97
97
  ```
98
98
 
99
+ ### When the all-reduce path changes silently
100
+
101
+ vLLM chooses an all-reduce implementation per TP group out of a candidate list, and
102
+ FlashInfer can pick its own backend on top of that. These lines are printed once at
103
+ startup and never mentioned again — which is how a version bump can move decode
104
+ through a different communication path without any flag changing. Since 0.3.7 they
105
+ are facts (this is `servediff show` on the same v0.23.1 TP=8 log):
106
+
107
+ ```text
108
+ backend.allreduce_dispatch tp:0: ['CUSTOM', 'SYMM_MEM', 'PYNCCL'] line 37
109
+ backend.allreduce_flashinfer mnnvl line 102
110
+ backend.allreduce_fusion ["norm: mnnvl", "norm quantization: trtllm"] line 106
111
+ backend.allreduce_potential ['NCCL_SYMM_MEM', 'QUICK_REDUCE', 'FLASHINFER', 'AITER_CU... line 37
112
+ model_runner V2 line 39
113
+ ```
114
+
115
+ The first two separate *chosen* from *possible*: FlashInfer sitting in `potential`
116
+ but not in `dispatch` means it was not used for that group. The last two record
117
+ whether FlashInfer's fused workspaces were actually built, but read their absence
118
+ carefully: since 0.29.0 the FlashInfer auto-selection line is logged at DEBUG
119
+ (`debug_once`), so on a default INFO log it may simply not have been printed. The
120
+ `all-reduce backends (in dispatch order)` line is `info_once` in 0.29.0, which makes
121
+ the dispatch chain the reliable cross-version signal. `model_runner` covers V1 vs V2
122
+ (so `VLLM_USE_V2_MODEL_RUNNER=0` runs are identifiable), and `compile.fusions` carries
123
+ `allreduce_rms` when `fuse_allreduce_rms` is on.
124
+
125
+ A fact missing from *both* logs leaves no diff row at all, so it would otherwise be
126
+ counted as "identical" without ever being compared. Since 0.3.8 `diff` names the reason
127
+ where it can tell, instead of leaving that to the reader:
128
+
129
+ ```text
130
+ > ℹ️ baseline: no all-reduce facts: world_size=1, so there is no all-reduce group and
131
+ no backend is chosen; a TP>1 run is what makes this path observable
132
+ ```
133
+
134
+ That note is what separates *nothing changed* from *nothing could be seen*: on a TP=1
135
+ log the all-reduce path does not exist to compare, and a TP>1 log that begins after
136
+ engine init never printed the selection. The same mechanism flags a 0.29+ log whose
137
+ FlashInfer fact is missing because the line is DEBUG-only.
138
+
139
+ That makes the question raised in
140
+ [vllm#63705](https://github.com/vllm-project/vllm/issues/63705) — *did 0.29 turn
141
+ FlashInfer all-reduce on by default (#52998)?* — answerable from logs you already
142
+ keep, one per version, same TP:
143
+
144
+ ```bash
145
+ servediff diff v0.28.log v0.29.log
146
+ ```
147
+
148
+ On a real 4×H100 TP4+EP node (MiniMax-M2.7, one run per version) that is exactly what
149
+ the diff showed between v0.26.0 and v0.29.0: the TP group chain went from `['PYNCCL']`
150
+ to `['FLASHINFER', 'PYNCCL']` while the EP group stayed `['PYNCCL']`, V2 Model Runner
151
+ appeared, and `allreduce_rms` was off in both runs — so the two changed defaults are
152
+ the TP-side FlashInfer path and the model runner ([reported
153
+ here](https://github.com/vllm-project/vllm/issues/63705#issuecomment-6656162111)).
154
+
99
155
  So a TP4+EP comparison (like the one in the
100
156
  [#63705 analysis](https://github.com/apex-mochen/servediff/blob/main/ISSUE-63705-analysis.md)
101
157
  — a decode-only regression across vLLM 0.29–0.32) can be scripted as:
@@ -151,6 +207,7 @@ contains `TOKEN`, `KEY`, `SECRET`, `PASSWORD`, `CREDENTIAL` or `AUTH` are replac
151
207
  | MoE backend | three log formats seen in 0.23–0.30 | `moe_runner_backend` arg |
152
208
  | CUDA graph | eager mode, `cudagraph_mode`, capture sets, pool size | prefill CUDA graph disabled |
153
209
  | model runner, UVA fallback | `Using V2 Model Runner`; V1 runner detected via `gpu_model_runner.py` module; pinned-memory fallback | — |
210
+ | all-reduce path | chosen chain per TP group + candidate pool (`all-reduce backends (in dispatch order) … out of potential backends`), FlashInfer's auto-selected backend and its norm / norm-quantization fusion workspaces (0.3.7+) | — |
154
211
  | parallel config | `world_size`, DP/PP/PCP/TP/ETP/EP/EPLB role assignment | — |
155
212
  | KV cache layout | `Using LBNHC KV cache layout` (0.30+) | — |
156
213
  | model loading | `Model loading took … GiB memory and … seconds` | — |
@@ -195,9 +252,9 @@ Exit codes: `0` no differences, `1` differences, `2` nothing recognised.
195
252
  a real TP=8 startup log from vllm#48591 (v0.23.1, one line per worker + role
196
253
  assignment); a real SGLang startup log from sgl-project/sglang#4862 (v0.4.4, TP=4,
197
254
  Qwen2.5-Omni-7B — `server_args=ServerArgs(...)` keyword-call form parsed, startup
198
- failure + root-cause error recorded). The parallel-config rules cover TP>1 real
199
- logs; MoE models in full logs, recent SGLang versions and other engines are not
200
- yet verified.
255
+ failure + root-cause error recorded). The parallel-config and all-reduce rules are
256
+ checked against real TP>1 logs; MoE models in full logs, recent SGLang versions and
257
+ other engines are not yet verified.
201
258
  - Parsing is regex-based on log text, which changes between versions. A missed line
202
259
  shows up as `<absent>`, never as a wrong value — please report it.
203
260
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "servediff"
7
- version = "0.3.7"
7
+ version = "0.3.8"
8
8
  description = "Diff what your vLLM / SGLang server actually ran with: auto-selected backends, CUDA graphs, startup failures, dependency versions."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -306,6 +306,49 @@ def diff(a: dict, b: dict, raw_args: bool = False) -> list[dict]:
306
306
  return rows
307
307
 
308
308
 
309
+ def _version_tuple(facts) -> tuple | None:
310
+ fact = facts.get("engine.version")
311
+ if not fact:
312
+ return None
313
+ match = re.match(r"(\d+)\.(\d+)\.(\d+)", str(fact.values[0]))
314
+ return tuple(int(part) for part in match.groups()) if match else None
315
+
316
+
317
+ def _is_single_rank(fact) -> bool:
318
+ value = fact.value
319
+ values = value if isinstance(value, list) else [value]
320
+ return all(v == 1 for v in values)
321
+
322
+
323
+ def absence_notes(parsed: dict) -> list[str]:
324
+ """Name the reason a log cannot yield a fact, where the tool can actually tell.
325
+
326
+ A fact absent from *both* logs leaves no diff row at all, so the summary says
327
+ "identical" about something that was never observed. For the all-reduce path
328
+ that silence carries the most weight: a single-rank run has no group to choose
329
+ a backend for, and since v0.29.0 the FlashInfer auto-selection line is logged
330
+ at DEBUG, so a default INFO log never contains it. Leaving the reader to guess
331
+ is how "absent" gets read as "off".
332
+ """
333
+ facts = parsed["facts"]
334
+ if "backend.allreduce_dispatch" not in facts:
335
+ world = facts.get("parallel.world_size")
336
+ if world is None:
337
+ return ["no all-reduce facts and no rank line: cannot tell whether this run had more than "
338
+ "one rank, so an absent all-reduce path here is inconclusive"]
339
+ if _is_single_rank(world):
340
+ return ["no all-reduce facts: world_size=1, so there is no all-reduce group and no backend "
341
+ "is chosen; a TP>1 run is what makes this path observable"]
342
+ return [f"no all-reduce facts although world_size={world.value}: the selection is printed once per "
343
+ "group at engine init, so a log that starts after initialisation cannot show it"]
344
+ version = _version_tuple(facts)
345
+ if "backend.allreduce_flashinfer" not in facts and version and version >= (0, 29, 0):
346
+ return ["backend.allreduce_flashinfer is absent although the dispatch chain printed: since "
347
+ f"v{'.'.join(map(str, version))} that line is logged at DEBUG, so a default INFO log never "
348
+ "contains it; the dispatch chain is the signal, not this fact"]
349
+ return []
350
+
351
+
309
352
  def _fmt(value) -> str:
310
353
  text = json.dumps(value, ensure_ascii=False) if not isinstance(value, str) else value
311
354
  return text if len(text) <= 60 else text[:57] + "..."
@@ -318,7 +361,7 @@ def _md_cell(value) -> str:
318
361
 
319
362
 
320
363
  def _render_markdown(*, path_a: str, path_b: str, engine_a, engine_b,
321
- rows: list[dict], warnings: list[str],
364
+ rows: list[dict], warnings: list[str], notes: list[str] = [],
322
365
  differing: int, identical: int, all_rows: bool) -> str:
323
366
  """Render a GitHub-flavored diff report, suitable for pasting into an issue."""
324
367
  lines: list[str] = ["# servediff report", ""]
@@ -329,6 +372,10 @@ def _render_markdown(*, path_a: str, path_b: str, engine_a, engine_b,
329
372
  lines.append(f"> ⚠️ {w}")
330
373
  if warnings:
331
374
  lines.append("")
375
+ for n in notes:
376
+ lines.append(f"> ℹ️ {n}")
377
+ if notes:
378
+ lines.append("")
332
379
  lines += ["| Fact | Baseline | Candidate | Status |", "|---|---|---|---|"]
333
380
  for r in rows:
334
381
  lines.append(f"| `{r['key']}` | {_md_cell(r['baseline'])} | {_md_cell(r['candidate'])} | {r['status']} |")
@@ -492,8 +539,12 @@ def main(argv=None) -> int:
492
539
  if not args.all: # errors after "ready" (e.g. on shutdown) say nothing about the config
493
540
  rows = [r for r in rows if not r["key"].startswith("after_ready.")]
494
541
  differing = [r for r in rows if r["status"] != "same"]
542
+ notes = []
543
+ for side, parsed in (("baseline", a), ("candidate", b)):
544
+ notes.extend(f"{side}: {note}" for note in absence_notes(parsed))
495
545
  if args.json:
496
- print(json.dumps({"differences": len(differing), "rows": rows}, indent=2, ensure_ascii=False, default=str))
546
+ print(json.dumps({"differences": len(differing), "notes": notes, "rows": rows},
547
+ indent=2, ensure_ascii=False, default=str))
497
548
  elif args.markdown:
498
549
  warnings = []
499
550
  for side, parsed in (("baseline", a), ("candidate", b)):
@@ -508,7 +559,7 @@ def main(argv=None) -> int:
508
559
  print(_render_markdown(
509
560
  path_a=str(args.baseline), path_b=str(args.candidate),
510
561
  engine_a=a["engine"], engine_b=b["engine"],
511
- rows=shown_rows, warnings=warnings,
562
+ rows=shown_rows, warnings=warnings, notes=notes,
512
563
  differing=len(differing), identical=len(rows) - len(differing),
513
564
  all_rows=bool(args.all)))
514
565
  else:
@@ -520,6 +571,10 @@ def main(argv=None) -> int:
520
571
  print(f"warning: {side} server failed to start"
521
572
  f"{': ' + _fmt(error.values[0]) if error else ''}; facts after the failure" # first = root cause
522
573
  " are absent because startup stopped, not because they were off\n")
574
+ for note in notes:
575
+ print(f"note: {note}")
576
+ if notes:
577
+ print()
523
578
  print(f"{'fact':32s} {'baseline':40s} {'candidate':40s} status")
524
579
  for r in rows if args.all else differing:
525
580
  print(f"{r['key']:32s} {_fmt(r['baseline'])[:40]:40s} {_fmt(r['candidate'])[:40]:40s} {r['status']}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: servediff
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: Diff what your vLLM / SGLang server actually ran with: auto-selected backends, CUDA graphs, startup failures, dependency versions.
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/apex-mochen/servediff
@@ -117,6 +117,62 @@ compile.fusions allreduce_rms
117
117
  startup failed
118
118
  ```
119
119
 
120
+ ### When the all-reduce path changes silently
121
+
122
+ vLLM chooses an all-reduce implementation per TP group out of a candidate list, and
123
+ FlashInfer can pick its own backend on top of that. These lines are printed once at
124
+ startup and never mentioned again — which is how a version bump can move decode
125
+ through a different communication path without any flag changing. Since 0.3.7 they
126
+ are facts (this is `servediff show` on the same v0.23.1 TP=8 log):
127
+
128
+ ```text
129
+ backend.allreduce_dispatch tp:0: ['CUSTOM', 'SYMM_MEM', 'PYNCCL'] line 37
130
+ backend.allreduce_flashinfer mnnvl line 102
131
+ backend.allreduce_fusion ["norm: mnnvl", "norm quantization: trtllm"] line 106
132
+ backend.allreduce_potential ['NCCL_SYMM_MEM', 'QUICK_REDUCE', 'FLASHINFER', 'AITER_CU... line 37
133
+ model_runner V2 line 39
134
+ ```
135
+
136
+ The first two separate *chosen* from *possible*: FlashInfer sitting in `potential`
137
+ but not in `dispatch` means it was not used for that group. The last two record
138
+ whether FlashInfer's fused workspaces were actually built, but read their absence
139
+ carefully: since 0.29.0 the FlashInfer auto-selection line is logged at DEBUG
140
+ (`debug_once`), so on a default INFO log it may simply not have been printed. The
141
+ `all-reduce backends (in dispatch order)` line is `info_once` in 0.29.0, which makes
142
+ the dispatch chain the reliable cross-version signal. `model_runner` covers V1 vs V2
143
+ (so `VLLM_USE_V2_MODEL_RUNNER=0` runs are identifiable), and `compile.fusions` carries
144
+ `allreduce_rms` when `fuse_allreduce_rms` is on.
145
+
146
+ A fact missing from *both* logs leaves no diff row at all, so it would otherwise be
147
+ counted as "identical" without ever being compared. Since 0.3.8 `diff` names the reason
148
+ where it can tell, instead of leaving that to the reader:
149
+
150
+ ```text
151
+ > ℹ️ baseline: no all-reduce facts: world_size=1, so there is no all-reduce group and
152
+ no backend is chosen; a TP>1 run is what makes this path observable
153
+ ```
154
+
155
+ That note is what separates *nothing changed* from *nothing could be seen*: on a TP=1
156
+ log the all-reduce path does not exist to compare, and a TP>1 log that begins after
157
+ engine init never printed the selection. The same mechanism flags a 0.29+ log whose
158
+ FlashInfer fact is missing because the line is DEBUG-only.
159
+
160
+ That makes the question raised in
161
+ [vllm#63705](https://github.com/vllm-project/vllm/issues/63705) — *did 0.29 turn
162
+ FlashInfer all-reduce on by default (#52998)?* — answerable from logs you already
163
+ keep, one per version, same TP:
164
+
165
+ ```bash
166
+ servediff diff v0.28.log v0.29.log
167
+ ```
168
+
169
+ On a real 4×H100 TP4+EP node (MiniMax-M2.7, one run per version) that is exactly what
170
+ the diff showed between v0.26.0 and v0.29.0: the TP group chain went from `['PYNCCL']`
171
+ to `['FLASHINFER', 'PYNCCL']` while the EP group stayed `['PYNCCL']`, V2 Model Runner
172
+ appeared, and `allreduce_rms` was off in both runs — so the two changed defaults are
173
+ the TP-side FlashInfer path and the model runner ([reported
174
+ here](https://github.com/vllm-project/vllm/issues/63705#issuecomment-6656162111)).
175
+
120
176
  So a TP4+EP comparison (like the one in the
121
177
  [#63705 analysis](https://github.com/apex-mochen/servediff/blob/main/ISSUE-63705-analysis.md)
122
178
  — a decode-only regression across vLLM 0.29–0.32) can be scripted as:
@@ -172,6 +228,7 @@ contains `TOKEN`, `KEY`, `SECRET`, `PASSWORD`, `CREDENTIAL` or `AUTH` are replac
172
228
  | MoE backend | three log formats seen in 0.23–0.30 | `moe_runner_backend` arg |
173
229
  | CUDA graph | eager mode, `cudagraph_mode`, capture sets, pool size | prefill CUDA graph disabled |
174
230
  | model runner, UVA fallback | `Using V2 Model Runner`; V1 runner detected via `gpu_model_runner.py` module; pinned-memory fallback | — |
231
+ | all-reduce path | chosen chain per TP group + candidate pool (`all-reduce backends (in dispatch order) … out of potential backends`), FlashInfer's auto-selected backend and its norm / norm-quantization fusion workspaces (0.3.7+) | — |
175
232
  | parallel config | `world_size`, DP/PP/PCP/TP/ETP/EP/EPLB role assignment | — |
176
233
  | KV cache layout | `Using LBNHC KV cache layout` (0.30+) | — |
177
234
  | model loading | `Model loading took … GiB memory and … seconds` | — |
@@ -216,9 +273,9 @@ Exit codes: `0` no differences, `1` differences, `2` nothing recognised.
216
273
  a real TP=8 startup log from vllm#48591 (v0.23.1, one line per worker + role
217
274
  assignment); a real SGLang startup log from sgl-project/sglang#4862 (v0.4.4, TP=4,
218
275
  Qwen2.5-Omni-7B — `server_args=ServerArgs(...)` keyword-call form parsed, startup
219
- failure + root-cause error recorded). The parallel-config rules cover TP>1 real
220
- logs; MoE models in full logs, recent SGLang versions and other engines are not
221
- yet verified.
276
+ failure + root-cause error recorded). The parallel-config and all-reduce rules are
277
+ checked against real TP>1 logs; MoE models in full logs, recent SGLang versions and
278
+ other engines are not yet verified.
222
279
  - Parsing is regex-based on log text, which changes between versions. A missed line
223
280
  shows up as `<absent>`, never as a wrong value — please report it.
224
281
 
@@ -309,3 +309,41 @@ def test_allreduce_backend_selection_is_recorded():
309
309
  assert "FLASHINFER" in f["backend.allreduce_potential"].value
310
310
  assert f["backend.allreduce_flashinfer"].value == "mnnvl"
311
311
  assert f["backend.allreduce_fusion"].values == ["norm: mnnvl", "norm quantization: trtllm"]
312
+
313
+
314
+ def test_single_rank_log_explains_the_missing_allreduce_path(tmp_path):
315
+ # A TP=1 log has no all-reduce group at all, so nothing is printed. Saying so
316
+ # is what keeps "absent" from being read as "unchanged".
317
+ log = tmp_path / "tp1.log"
318
+ log.write_text(
319
+ "INFO 10-28 11:28:09 [core.py:123] Initializing a V1 LLM engine (v0.30.0) with config: model='m'\n"
320
+ "INFO 10-28 11:28:12 [parallel_state.py:1827] world_size=1 rank=0 local_rank=0\n",
321
+ encoding="utf-8")
322
+ notes = servediff.absence_notes(servediff.parse(log.read_text(encoding="utf-8")))
323
+ assert len(notes) == 1 and "world_size=1" in notes[0] and "TP>1" in notes[0]
324
+
325
+
326
+ def test_flashinfer_absence_is_explained_only_from_029(tmp_path):
327
+ # v0.29.0 moved the auto-selection line to DEBUG; before that its absence
328
+ # really did mean the path was not taken, so the note must not fire there.
329
+ chain = ("INFO [cuda_communicator.py:1] Using ['FLASHINFER', 'PYNCCL'] all-reduce backends "
330
+ "(in dispatch order) for group 'tp:0' out of potential backends: "
331
+ "['FLASHINFER', 'PYNCCL']\n")
332
+ for version, expected in (("0.26.0", False), ("0.29.0", True)):
333
+ log = tmp_path / f"v{version}.log"
334
+ log.write_text(
335
+ f"INFO [core.py:122] Initializing a V1 LLM engine (v{version}) with config: model='m'\n" + chain,
336
+ encoding="utf-8")
337
+ notes = servediff.absence_notes(servediff.parse(log.read_text(encoding="utf-8")))
338
+ assert any("DEBUG" in n for n in notes) is expected
339
+
340
+
341
+ def test_markdown_reports_absence_notes(tmp_path, capsys):
342
+ body = ("INFO [core.py:123] Initializing a V1 LLM engine (v0.30.0) with config: model='m'\n"
343
+ "INFO [parallel_state.py:1827] world_size=1 rank=0 local_rank=0\n")
344
+ a, b = tmp_path / "a.log", tmp_path / "b.log"
345
+ a.write_text(body, encoding="utf-8")
346
+ b.write_text(body, encoding="utf-8")
347
+ assert servediff.main(["diff", str(a), str(b), "--markdown"]) == 0
348
+ out = capsys.readouterr().out
349
+ assert "ℹ️" in out and "world_size=1" in out
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes