Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .agents/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -34505,3 +34505,34 @@ The required Slack selection notification was attempted through the bundled
secret-safe sender to the only conventional target available, `#general`, but
Slack returned `channel_not_found`. No channel ID/name is configured and no
credential was inspected or exposed.

## 2026-08-03 - Darwin Laguna feature-guard repair

LocalAI Darwin consumer CI pinned at `ca5c7adc` exposed AppleClang 21's real
fatal error: `laguna.cpp:739` defined `LagunaMarlinMoeEnabled` in a Metal build,
while every call was compiled only under `VT_MARLIN_NVFP4`. The two preceding
`-Wgnu-folding-constant` annotations came instead from Go module
`github.com/shoenig/go-m1cpu@v0.1.6` before vllm.cpp was checked out; the MLX
translation-unit suppressions in PRs #23/#24 were unrelated to this failure.

The helper definition now shares its call sites' `VT_MARLIN_NVFP4` guard. A
RED-first real-tree test in `test_device_leakage.py` asserts that the helper
cannot drift outside the feature boundary again. This is build portability
only: no runtime, model, lifecycle, correctness, or benchmark state changed.

## 2026-08-03 - Darwin Voxtral compiler-pragma repair

The next LocalAI Darwin consumer run (`30778738021`, job `91579246349`, pin
`065373dc`) confirmed that the two annotated `-Wgnu-folding-constant` warnings
were emitted by Go dependency `github.com/shoenig/go-m1cpu@v0.1.6` and did not
stop the build. The actual fatal error occurred later at
`voxtral.cpp:240`: AppleClang does not recognize GCC's
`-Wstringop-overflow`, so the diagnostic-suppression pragma itself became
`-Werror,-Wunknown-warning-option`.

The GCC-13 false-positive suppression is now bounded by
`defined(__GNUC__) && !defined(__clang__)`; the in-bounds copy code is
unchanged. A RED-first source regression test pins that ownership boundary.
This is build portability only and changes no runtime, model lifecycle,
correctness result, or benchmark disposition. Darwin consumer CI remains the
binding AppleClang verification.
12 changes: 12 additions & 0 deletions docs/BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11230,3 +11230,15 @@ steady-state per-step / nsys decode tok/s (eager vs graphed) is OWED.

<!-- framework-routing (2026-08-02) -->
- Laguna-XS-2.1-NVFP4 decode (GB10, vs vLLM 42.46 tok/s): split-K + w13-fusion → 35.3 tok/s (83.2%). Residual is GPU-kernel work inside the graph (measured). PENDING: full KV/attention framework port. Qwen3DenseDecodeGraph ~4.3% e2e (directional; rigorous per-step tok/s OWED). Qwen3VL/DS4 routing = framework-conformance (no speed claim); CUDA re-gate OWED.

<!-- darwin-laguna-build-repair (2026-08-03) -->
- **Darwin Laguna feature-guard repair: NOT APPLICABLE to benchmarks.** Guarding
the Marlin-only environment helper out of non-Marlin builds changes no CUDA
runtime path, model output, memory use, or performance. The binding evidence
is the AppleClang 21 `-Werror,-Wunused-function` consumer failure plus the
source-invariant regression gate; no speed measurement is owed.
- **Darwin Voxtral pragma repair: NOT APPLICABLE to benchmarks.** Restricting a
GCC false-positive suppression to GCC changes no runtime path or generated
code. The binding evidence is the AppleClang `-Werror,-Wunknown-warning-option`
consumer failure and the compiler-boundary regression gate; no speed number
is owed.
10 changes: 10 additions & 0 deletions docs/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2119,3 +2119,13 @@ _(Laguna decode KV+attention → shared-framework port, bf16-KV slice (2026-08-0

<!-- decode/runtime framework-routing (2026-08-02) -->
- **Decode/runtime framework-routing** — `GATING`. Third "MUST route through" seam codified (AGENTS.md) + CI-enforced (`check-runner-routing-consistency.py`, green: 27 models, 3 allowlisted). Landed: Laguna split-K attention + w13-fusion (82.7→83.2% of vLLM decode); shared `Qwen3DenseDecodeGraph` (5 registrations, GB10 token-exact 16/16); Qwen3VL + DeepSeek-V4 routed to on-device logits + runner entry. Pending: Laguna gate-up fold onto the shared MLP seam (allowlisted) + its full KV/attention port onto `AttnBlock` (the kernel-level residual to vLLM parity); CUDA re-gates for Qwen3VL/DS4 owed.

**Darwin Laguna build repair (2026-08-03).** The Marlin-only
`LagunaMarlinMoeEnabled` helper now shares the `VT_MARLIN_NVFP4` feature guard
used by every call site, so non-CUDA AppleClang builds do not emit
`-Wunused-function` under `-Werror`. A static regression gate enforces that
boundary; runtime behavior and Laguna's lifecycle state are unchanged.
The next consumer run exposed a separate Voxtral portability error: its
GCC-only `-Wstringop-overflow` suppression is now guarded out of Clang builds,
where the unknown warning name was itself fatal under `-Werror`. The Go
`go-m1cpu` folding diagnostics in that run were nonfatal and outside this repo.
3 changes: 3 additions & 0 deletions src/vllm/model_executor/models/laguna.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,8 @@ void LagunaSharedExpertMarlinInto(vt::Queue& q, const LagunaMoeWeights& moe, con
// gate lands; then flip to default-ON per the parity-enablers-ship-as-defaults
// policy. VT_LAGUNA_MARLIN_MOE=1 enables. Only meaningful when VT_MARLIN_NVFP4
// compiled the path in.
// DSR-ALLOW(S1): Marlin-only environment gate; all consumers share this build guard.
#ifdef VT_MARLIN_NVFP4
inline bool LagunaMarlinMoeEnabled() {
// DEFAULT ON: the Marlin W4A16 grouped MoE is vLLM's own 18.8-tok/s kernel and the
// validated fast Laguna-NVFP4 decode path (reproduced 3× on GB10, golden-matching,
Expand All @@ -823,6 +825,7 @@ inline bool LagunaMarlinMoeEnabled() {
}();
return on;
}
#endif // VT_MARLIN_NVFP4

// Keep-quant GEMM against a ROW-SLICE [row_off, row_off+N) of a stacked block
// weight `w` [E*out, K] — the per-expert (moe_*_exps) slice. Rows are whole
Expand Down
4 changes: 4 additions & 0 deletions src/vllm/model_executor/models/voxtral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ void BuildPaddedDecodeAttn(int64_t S, const std::vector<int32_t>& tok,
// -O2 inliner mis-derives a `[0,4]`-byte bound for the memmove and errors. The
// suppression is scoped to exactly this builder's in-bounds copies; a comment,
// not a broad -Wno. (Advances #155; unrelated to the W7-device change.)
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
tok_out.assign(static_cast<size_t>(S), 0);
pos_out.assign(static_cast<size_t>(S), 0);
std::copy(tok.begin(), tok.end(), tok_out.begin());
Expand All @@ -255,7 +257,9 @@ void BuildPaddedDecodeAttn(int64_t S, const std::vector<int32_t>& tok,
am_out.block_table_tensor.assign(static_cast<size_t>(S * cols), 0);
std::copy(am.block_table_tensor.begin(), am.block_table_tensor.end(),
am_out.block_table_tensor.begin());
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
am_out.query_start_loc.resize(static_cast<size_t>(S + 1));
for (int64_t i = 0; i <= S; ++i)
am_out.query_start_loc[static_cast<size_t>(i)] = static_cast<int32_t>(i);
Expand Down
31 changes: 31 additions & 0 deletions tests/scripts/test_compiler_pragma_boundaries.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
"""Regression gates for compiler-specific diagnostic pragmas."""

import pathlib
import re
import unittest


ROOT = pathlib.Path(__file__).resolve().parents[2]


class CompilerPragmaBoundaryTest(unittest.TestCase):
def test_voxtral_gcc_only_warning_is_hidden_from_clang(self):
source = (
ROOT / "src/vllm/model_executor/models/voxtral.cpp"
).read_text(encoding="utf-8")
guarded = re.search(
r"#if defined\(__GNUC__\) && !defined\(__clang__\)"
r"(?P<body>.*?)#endif",
source,
re.DOTALL,
)
self.assertIsNotNone(guarded)
self.assertIn(
'#pragma GCC diagnostic ignored "-Wstringop-overflow"',
guarded.group("body"),
)


if __name__ == "__main__":
unittest.main()
14 changes: 14 additions & 0 deletions tests/scripts/test_device_leakage.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,20 @@ def test_M19_device_legs_under_src_vt_are_not_scanned(self) -> None:
class RealTreeTests(unittest.TestCase):
"""Hard expectations about THIS repository, not a synthetic mutant."""

def test_laguna_marlin_gate_helper_is_feature_guarded(self) -> None:
path = ROOT / "src/vllm/model_executor/models/laguna.cpp"
lines = path.read_text(encoding="utf-8").splitlines()
definitions = [
index
for index, line in enumerate(lines)
if "inline bool LagunaMarlinMoeEnabled()" in line
]
self.assertEqual(len(definitions), 1)
self.assertTrue(
dl.cuda_guard_depth(lines)[definitions[0]],
"LagunaMarlinMoeEnabled must not compile outside VT_MARLIN_NVFP4",
)

def test_baseline_matches_the_tree_exactly(self) -> None:
# This is the CI gate itself, asserted here too so a local run catches it
# before the push.
Expand Down
Loading