From 7795d5612c81ab159e1d8b0cd02114413395d106 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong <277547417+bong-water-water-bong@users.noreply.github.com> Date: Thu, 5 Nov 2026 18:55:18 -0400 Subject: [PATCH 1/2] ci: the draft-loop measurement tool is compile-checked, so a header rename cannot break it silently Every draft-loop number in this lane is measured with tools/mtp_acceptance, and no job compiles it: it links onebit_npu_forward, which exists only under ONEBIT_NPU, which refuses to configure without the private runtime (ONEBIT_NPU_RT_DIR: npu_rt.h, npu_rt.cpp, npu_rt_api.cpp, not in this repository). So the binary is built by hand on the measurement host and nowhere else. That is the same hole the fixtures closed for the pooled verdict, one level up: npu/mtp/draft.h, forward_base.h and npu/forward/include/ changed three times in one evening (#1138 changed the hidden row shapes, #1143 the row accessor), and each of those is a compile break for this tool that CI cannot see. The next person to measure would find it on a device ticket instead. The check is a syntax-only compile against the in-tree headers (npu/rt.h guards itself on ONEBIT_NPU_RUNTIME_OWN and needs only npu/npu_rt_api.h, which is tracked), using the json headers the configure step has already fetched. Verified: 'g++ (Ubuntu 15.2.0) -std=c++26 -fsyntax-only ...' rc 0 on this head; injection -- renaming ForwardBase::last_hidden to last_hidden_name_drift -- makes the same command fail with "marked 'override', but does not override" (rc 2), so the step is a check and not a no-op; copyright --check rc 0. --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9482c27f..65335fb21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,6 +66,15 @@ jobs: run: python3 tools/pin_watch.py --self-test - name: Configure run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-16 -DCMAKE_CXX_COMPILER=g++-16 + - name: The draft-loop measurement tool still compiles + # tools/mtp_acceptance is the binary every draft-loop number is measured with, and it is not a + # build target here: it links the NPU forward, whose runtime is private (ONEBIT_NPU wants + # ONEBIT_NPU_RT_DIR). A rename in npu/mtp/ or npu/forward/include/ would therefore break it + # silently until someone built it on a device. Syntax-only, against the in-tree headers only. + run: | + g++ -std=c++26 -fsyntax-only -DONEBIT_NPU_RUNTIME_OWN \ + -Inpu -Inpu/forward/include -Ibuild/_deps/json-src/include \ + tools/mtp_acceptance.cpp - name: Build # Every target a ctest test invokes must be listed here: `ctest` runs whatever # binaries exist, so a test whose target is missing reports "Not Run" and never From ff19bbfde3aa45a511598276fcc2b3fe980ad8b7 Mon Sep 17 00:00:00 2001 From: pi-mtploop Date: Thu, 5 Nov 2026 20:10:16 -0400 Subject: [PATCH 2/2] ci: the compile check runs the compiler the build uses (g++-16, not a bare g++) The step added in 7795d561 failed before it compiled anything: build The draft-loop measurement tool still compiles /__w/_temp/...sh: 1: g++: not found ##[error]Process completed with exit code 127 The image installs versioned binaries only (the tool step asks for gcc-16 g++-16, which does not create /usr/bin/g++), and the Configure step in the same job already sets -DCMAKE_CXX_COMPILER=g++-16. So the check now invokes g++-16: the same compiler the build uses, and the one whose C++26 front end this file needs. Verified on this host, both arms, with the versioned binary and the configure-fetched json headers: g++-16 -std=c++26 -fsyntax-only -DONEBIT_NPU_RUNTIME_OWN -Inpu -Inpu/forward/include \ -I/_deps/json-src/include tools/mtp_acceptance.cpp -> rc 0 (one vendored-nlohmann deprecation warning, not an error), and the injection still reds it: renaming ForwardBase::last_hidden to last_hidden_name_drift gives "marked 'override', but does not override" -> rc 1, file restored. python3 -c 'yaml.safe_load(ci.yml)' parses; tools/copyright.py --check rc 0. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65335fb21..a9577e13c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,9 @@ jobs: # ONEBIT_NPU_RT_DIR). A rename in npu/mtp/ or npu/forward/include/ would therefore break it # silently until someone built it on a device. Syntax-only, against the in-tree headers only. run: | - g++ -std=c++26 -fsyntax-only -DONEBIT_NPU_RUNTIME_OWN \ + # The image installs versioned binaries only (no /usr/bin/g++), and Configure above + # already picks g++-16, so the check compiles with the same compiler the build uses. + g++-16 -std=c++26 -fsyntax-only -DONEBIT_NPU_RUNTIME_OWN \ -Inpu -Inpu/forward/include -Ibuild/_deps/json-src/include \ tools/mtp_acceptance.cpp - name: Build