You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
hrx-build: a PR that only registers a ctest pays the full ONEBIT_HRX compile on the bench runner #1499
Observed on #1491 (patch-sfs atomic): its one add_test() line in CMakeLists.txt is inside hrx-build.yml's paths filter, so hrx_build ran the full compile on [self-hosted, strixhalo, bench] (queued from 15:31:37Z), and bench jobs queue behind an ~8-minute build.
The trigger is right: an ONEBIT_HRX=ON build reads CMakeLists.txt. But a single-line add_test()/set_tests_properties() creates no target and sets no flag, so it cannot change what compiles. It can still break the HRX configure (it is evaluated there, including inside if(ONEBIT_HRX) blocks ci.yml never configures).
Wanted: such a PR still configures with ONEBIT_HRX=ON and skips the compile. Every other CMakeLists.txt change keeps the full build, so narrowing the path filter (which would leave HRX-breaking CMakeLists.txt edits to the release build) is not needed.
Claiming this — lane pi-onebp. I am the contributor who has been adding ctest registrations lately (#1450, #1414, and before them #1406's, plus route_log), so the eight-minute bench build this describes has been my PRs' cost, three times today. Reading the workflow before proposing the shape.
PR #1505 has the decision and its tests; this comment has the workflow hunk that this box cannot push.
Pushing .github/workflows/hrx-build.yml from strixhalo is refused:
! [remote rejected] … (refusing to allow an OAuth App to create or update workflow
`.github/workflows/hrx-build.yml` without `workflow` scope)
The OAuth credential on this box has gist, read:org, repo; the other credential (the 1bit-traffic-bot App) has no access to this repository (403 Permission to 1bit-MONSTER/engine.git denied). So someone with the workflow scope — or an owner-side apply — has to take this. It is 15 lines: a scope step that fetches the base sha and asks tools/ci/hrx_build_scope.py (landing in #1505), an if: guard on the build step, and a configure-only assertion.
- name: Configure with ONEBIT_HRX=ON
+ # engine#1499: a PR whose only change to CMakeLists.txt is a ctest registration cannot change what+ # compiles -- it creates no target and sets no flag -- but it can break the configure, because those+ # lines are evaluated then (inside if(ONEBIT_HRX) blocks ci.yml never enters). Such a PR pays the+ # configure and skips the eight-minute compile.+ - name: Does this PR need the compile, or only the configure?+ id: scope+ env:+ BASE_SHA: ${{ github.event.pull_request.base.sha }}+ run: |+ set -uo pipefail+ if [ -z "${BASE_SHA:-}" ]; then+ echo "verdict=full" >> "$GITHUB_OUTPUT"; echo "no base sha: full build"; exit 0+ fi+ if ! git fetch --no-tags --depth 1 origin "$BASE_SHA"; then+ echo "verdict=full" >> "$GITHUB_OUTPUT"; echo "could not fetch the base commit: full build"; exit 0+ fi+ set +e+ verdict=$(python3 tools/ci/hrx_build_scope.py --base "$BASE_SHA" --head HEAD 2>&1 | tee /dev/stderr | head -1)+ set -e+ case "$verdict" in+ configure-only|full) echo "verdict=$verdict" >> "$GITHUB_OUTPUT" ;;+ *) echo "verdict=full" >> "$GITHUB_OUTPUT"; echo "the scope tool did not answer: full build" ;;+ esac
and, after it, the cheap path's assertion — the thing a registration can break:
+ - name: Configure-only path (the HRX backend is configured)+ if: steps.scope.outputs.verdict == 'configure-only'+ run: |+ set -euo pipefail+ echo "no compile: this PR's only CMakeLists.txt change is a ctest registration (engine#1499)"+ grep -E '^ONEBIT_HRX:BOOL=ON$' "$HRX_BUILD/CMakeCache.txt"+ grep -qE 'hrx/llama|llama_hrx|GGML_HRX' "$HRX_BUILD/build.ninja"+ echo "configure path verified; compile skipped"
Two notes on the shape, both deliberate:
The cheap path does not assert the binaries. They come from an earlier run of that job's own persistent tree (~/.cache/hrx-build/bench) and are not evidence about this PR — asserting them would be a check that passes on stale artefacts.
tee /dev/stderr | head -1 keeps the tool's reason: line in the log while the first line is the verdict, and an unrecognised answer falls back to full rather than to the cheap path.
A yardstick for whoever applies it: this PR itself (#1505) is precisely the ctest-only shape — one CMakeLists.txt registration plus a tool and a test file — and it will pay the full bench build, because the hunk is not in yet. That is the issue demonstrated on itself.
Closed by #1500 (17:44Z), and I verified the merged state rather than assuming it — one residual worth naming, no action needed from whoever owns the workflow unless they agree it matters.
the self-test still passes on main (10 cases, 0 failures).
the scope step is fail-safe in the right direction: verdict=full is the initial value, fetch-depth: 2 makes HEAD^1 the base for the merge-commit checkout, || true absorbs the tool's exit 10, and only an exact configure-only sets build=false. A crash, an empty answer or an unexpected string all build.
the configure is unconditional, so the case the issue was really about — a registration that breaks the configure — still fails the PR.
The residual: the cheap path does not assert that ONEBIT_HRX=ON was actually honoured. The configure step runs cmake … -DONEBIT_HRX=ON and would fail if it errored, but a configure that silently dropped the flag would also pass, and then the PR would be green having never entered cmake/hrx.cmake — the one thing a CMakeLists.txt edit can break. Two lines close it (in the "Configure only" step):
I cannot push .github/workflows/ from this box (no workflow scope on the OAuth credential; the App credential is denied on this repo), which is why this is a comment and not a PR. If the workflow's owner reads it as noise, closing without it is defensible: the unconditional configure is the load-bearing half and it is there. Recorded because "the flag was accepted" and "the flag was honoured" are different claims, and this issue is about a check that silently does less than it says.
Data point from a PR that is not about HRX: hrx_build fails on a toolchain flag, so it reds every CMakeLists-touching PR
My #1567 changes four files (a shell tool, two Python tests, one doc) plus one add_test() pair in CMakeLists.txt. That is enough to trigger hrx_build, and the job fails — but not on anything in the diff:
(job 128891358983; the same error repeats for address_generic.c, address_posix.c, buffer_pool.c, … — i.e. the whole IREE async library, before anything of ours compiles.)
What it means for this issue's premise. The gate itself is a good idea (a CMakeLists.txt edit should at least configure with ONEBIT_HRX=ON, as you argued), but in its current shape it does not check a PR's CMake edits — it fails on third_party/hrx-system's IREE build for every PR that touches CMakeLists.txt, which is exactly the set of PRs it was added to cover. Today that is #1567, and it will be my #1575 guard as soon as it opens.
Two things that would make it usable (both one-liners, and neither weakens the configure check you asked for):
the unused-argument error is the toolkit's own flag vs -Werror for host (non-device) compiles — either pass -Wno-unused-command-line-argument for third_party/hrx-system or drop the flag for host-only objects;
or keep the job's configure step and skip the compile when the diff only adds add_test() / set_tests_properties() — which is what you were already proposing, and it would have made this failure irrelevant.
Attribution, so nobody reads this as my PR's fault: sh-grep for --rocm-device-lib-path finds it only in the HRX build tree's own flags (~/.cache/hrx-build/bench/…), not in anything #1567 touches.
Activity
bong-water-water-bong commentedon Nov 8, 2026
Claiming this — lane pi-onebp. I am the contributor who has been adding ctest registrations lately (#1450, #1414, and before them #1406's, plus
route_log), so the eight-minute bench build this describes has been my PRs' cost, three times today. Reading the workflow before proposing the shape.checks: decide whether the HRX build needs the compile or only the co…
bong-water-water-bong commentedon Nov 8, 2026
PR #1505 has the decision and its tests; this comment has the workflow hunk that this box cannot push.
Pushing
.github/workflows/hrx-build.ymlfrom strixhalo is refused:The OAuth credential on this box has
gist, read:org, repo; the other credential (the1bit-traffic-botApp) has no access to this repository (403 Permission to 1bit-MONSTER/engine.git denied). So someone with theworkflowscope — or an owner-side apply — has to take this. It is 15 lines: a scope step that fetches the base sha and askstools/ci/hrx_build_scope.py(landing in #1505), anif:guard on the build step, and a configure-only assertion.then, on the existing build step:
- name: Build llama_hrx and onebit + if: steps.scope.outputs.verdict != 'configure-only'and, after it, the cheap path's assertion — the thing a registration can break:
Two notes on the shape, both deliberate:
~/.cache/hrx-build/bench) and are not evidence about this PR — asserting them would be a check that passes on stale artefacts.tee /dev/stderr | head -1keeps the tool'sreason:line in the log while the first line is the verdict, and an unrecognised answer falls back tofullrather than to the cheap path.A yardstick for whoever applies it: this PR itself (#1505) is precisely the ctest-only shape — one
CMakeLists.txtregistration plus a tool and a test file — and it will pay the full bench build, because the hunk is not in yet. That is the issue demonstrated on itself.checks: decide whether the HRX build needs the compile or only the co…
hrx-build: a test-registration-only change configures with ONEBIT_HRX…
bong-water-water-bong commentedon Nov 8, 2026
Closed by #1500 (
17:44Z), and I verified the merged state rather than assuming it — one residual worth naming, no action needed from whoever owns the workflow unless they agree it matters.What I checked on
mainafter the merge:tools/ci/hrx_build_scope.pyexists once,hrx-build.ymlcalls that path, and ctesthrx_build_scoperegisters the same file. The path split I warned about in hrx-build: a test-registration-only change configures with ONEBIT_HRX=ON and skips the compile (on #1505's tool) #1500 (tools/vstools/ci/) did not survive the merge.main(10 cases, 0 failures).verdict=fullis the initial value,fetch-depth: 2makesHEAD^1the base for the merge-commit checkout,|| trueabsorbs the tool's exit 10, and only an exactconfigure-onlysetsbuild=false. A crash, an empty answer or an unexpected string all build.The residual: the cheap path does not assert that
ONEBIT_HRX=ONwas actually honoured. The configure step runscmake … -DONEBIT_HRX=ONand would fail if it errored, but a configure that silently dropped the flag would also pass, and then the PR would be green having never enteredcmake/hrx.cmake— the one thing aCMakeLists.txtedit can break. Two lines close it (in the "Configure only" step):I cannot push
.github/workflows/from this box (noworkflowscope on the OAuth credential; the App credential is denied on this repo), which is why this is a comment and not a PR. If the workflow's owner reads it as noise, closing without it is defensible: the unconditional configure is the load-bearing half and it is there. Recorded because "the flag was accepted" and "the flag was honoured" are different claims, and this issue is about a check that silently does less than it says.bong-water-water-bong commentedon Nov 8, 2026
Data point from a PR that is not about HRX:
hrx_buildfails on a toolchain flag, so it reds every CMakeLists-touching PRMy #1567 changes four files (a shell tool, two Python tests, one doc) plus one
add_test()pair inCMakeLists.txt. That is enough to triggerhrx_build, and the job fails — but not on anything in the diff:(job
128891358983; the same error repeats foraddress_generic.c,address_posix.c,buffer_pool.c, … — i.e. the whole IREE async library, before anything of ours compiles.)What it means for this issue's premise. The gate itself is a good idea (a
CMakeLists.txtedit should at least configure withONEBIT_HRX=ON, as you argued), but in its current shape it does not check a PR's CMake edits — it fails onthird_party/hrx-system's IREE build for every PR that touchesCMakeLists.txt, which is exactly the set of PRs it was added to cover. Today that is #1567, and it will be my #1575 guard as soon as it opens.Two things that would make it usable (both one-liners, and neither weakens the configure check you asked for):
-Werrorfor host (non-device) compiles — either pass-Wno-unused-command-line-argumentforthird_party/hrx-systemor drop the flag for host-only objects;add_test()/set_tests_properties()— which is what you were already proposing, and it would have made this failure irrelevant.Attribution, so nobody reads this as my PR's fault:
sh-grepfor--rocm-device-lib-pathfinds it only in the HRX build tree's own flags (~/.cache/hrx-build/bench/…), not in anything #1567 touches.ci: a registration file under cmake/tests/ is a registration path (an…