diff --git a/.agents/state.md b/.agents/state.md index 173f48b6..4c3604f4 100644 --- a/.agents/state.md +++ b/.agents/state.md @@ -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. diff --git a/docs/BENCHMARKS.md b/docs/BENCHMARKS.md index fc665a30..3d898161 100644 --- a/docs/BENCHMARKS.md +++ b/docs/BENCHMARKS.md @@ -11230,3 +11230,15 @@ steady-state per-step / nsys decode tok/s (eager vs graphed) is OWED. - 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 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. diff --git a/docs/STATUS.md b/docs/STATUS.md index b8bfbbca..5b9f6bde 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -2119,3 +2119,13 @@ _(Laguna decode KV+attention → shared-framework port, bf16-KV slice (2026-08-0 - **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. diff --git a/src/vllm/model_executor/models/laguna.cpp b/src/vllm/model_executor/models/laguna.cpp index 9096cddb..9045c965 100644 --- a/src/vllm/model_executor/models/laguna.cpp +++ b/src/vllm/model_executor/models/laguna.cpp @@ -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, @@ -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 diff --git a/src/vllm/model_executor/models/voxtral.cpp b/src/vllm/model_executor/models/voxtral.cpp index b9872ba0..cf42b249 100644 --- a/src/vllm/model_executor/models/voxtral.cpp +++ b/src/vllm/model_executor/models/voxtral.cpp @@ -235,9 +235,11 @@ void BuildPaddedDecodeAttn(int64_t S, const std::vector& 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(S), 0); pos_out.assign(static_cast(S), 0); std::copy(tok.begin(), tok.end(), tok_out.begin()); @@ -255,7 +257,9 @@ void BuildPaddedDecodeAttn(int64_t S, const std::vector& tok, am_out.block_table_tensor.assign(static_cast(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(S + 1)); for (int64_t i = 0; i <= S; ++i) am_out.query_start_loc[static_cast(i)] = static_cast(i); diff --git a/tests/scripts/test_compiler_pragma_boundaries.py b/tests/scripts/test_compiler_pragma_boundaries.py new file mode 100644 index 00000000..fc18f04b --- /dev/null +++ b/tests/scripts/test_compiler_pragma_boundaries.py @@ -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.*?)#endif", + source, + re.DOTALL, + ) + self.assertIsNotNone(guarded) + self.assertIn( + '#pragma GCC diagnostic ignored "-Wstringop-overflow"', + guarded.group("body"), + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/scripts/test_device_leakage.py b/tests/scripts/test_device_leakage.py index 529ffc03..28b9bac0 100644 --- a/tests/scripts/test_device_leakage.py +++ b/tests/scripts/test_device_leakage.py @@ -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.