Skip to content

release-check: hrx-placement measures the mechanism the engine has, and measures it right (engine#3353) - #3368

Merged
bong-water-water-bong merged 2 commits into
mainfrom
cl-release/hrx-placement-v2
Nov 23, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
cl-release/hrx-placement-v2

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Part of #3353, item 2: make hrx-placement actually run on a release. #3354 fixed the model lookup ($HF_HOME/hub/) and added --fetch. This PR is the row itself.

Why it skipped even with the model staged: it compared GGML_HRX_WEIGHT_HOST_PLACEMENT, the weight-mapping import that fork #234 / engine #1351 removed. v2026.48's libggml-hrx.so.0.28.0 has 0 occurrences of that name, so the row always stopped at "this build does not carry the switch".

What it compares now:

  • The two arms: the shipped default (the loader wraps its file mapping as a host buffer and HRX makes per-weight device copies; llama.cpp Census 2026-10-04 #304 / engine#856) against GGML_HRX_MODEL_BUFFER_COPY=1 (the upload into a device buffer). v2026.48's lib has that switch.
  • Each arm gets one short question before the sample, because Census 2026-10-04 #304 makes the device copies at the first prompt.
  • It PASSes when the upload costs at least 15% more of its own GTT. docs/hrx.md measured 5,665 against 3,225 MiB on this 4B (1.76x), and only 1.04x with a 1,282-word prompt. That is why the question is short, and there is a self-test case for it.

Three measurement bugs, found on the board on the way. All three runs reported "3 / 4 MiB":

  • Units. hrxp_gtt divided the drm-total-gtt sum by 1024×1024 as if it were bytes, but 7.4 prints it in KiB (drm-total-gtt: 3281620 KiB). So 3.2 GiB read as "3 MiB". It now reads each line's unit (KiB, MiB, GiB, bytes). A self-test runs it over a fake fdinfo, where 3281620 KiB + 2 MiB must give 3206 MiB, through a new HRXP_PROC seam.
  • Loading. 1bit serve answers /health while its llama-server still loads, and a request in that window is a quick 503 (curl -sf hid it). The question now retries until it is answered, within HRXP_WAIT. An arm that is never answered is "did not come up".
  • Process tree. The arm is now weighed as its whole process tree (parent links in /proc), not just setsid's group.
  • A verdict floor: an arm holding less than half the model file in GTT FAILs as "not a measurement". The 3/4-MiB case is a self-test that must FAIL. Before the floor, the relative test called it a PASS.

Measured on strixhalo (installed v2026.48, Qwen3-4B-Instruct-2507-Q4_K_M.gguf from $HF_HOME/hub, 2,381 MiB, under box-hold gpu). The harness runs this branch's own row functions, extracted from the script with sed:

default arm: 3204 MiB (7 s)
upload arm:  4506 MiB (5 s)
PASS the shipped default (the loader's mapping, #304) costs 3204 MiB of its own GTT against 4506 MiB with GGML_HRX_MODEL_BUFFER_COPY=1
  • The default's 3,204 MiB matches docs/hrx.md's 3,225 MiB.
  • A one-arm fdinfo dump agreed: the llama-server child of 1bit serve showed drm-total-gtt: 3281620 KiB.
  • The upload's 4,506 MiB is below the docs' 5,665 MiB, a later pin and fewer copies, but 1.41x the default, well over the floor.

Checks: os/mini/release-check.sh --self-test: rc 0 (verdict cases rewritten, plus the long-prompt FAIL, the 3/4-MiB FAIL, and the units case). bash scripts/pre-pr-checks.sh --base origin/main: 17 green, 3 skipped.

Not run: the full release check on the board with this script. The board run belongs to the release procedure, with --fetch.

🤖 Generated with Claude Code

…nd measures it right (engine#3353)

The row compared GGML_HRX_WEIGHT_HOST_PLACEMENT, the weight-mapping import fork #234 removed, so it skipped on every
build. It now compares the shipped default (the loader's file mapping as a host buffer, llama.cpp #304 / engine#856)
with GGML_HRX_MODEL_BUFFER_COPY=1 (the upload), and PASSes when the upload costs >= 15% more of its own GTT.

Three measurement bugs found on the board on the way (each reported 3-4 MiB):
- hrxp_gtt divided drm-total-gtt, a KiB value on 7.4, by 1024*1024: GiB printed as MiB. Now unit-aware.
- 1bit serve answers /health while its llama-server still loads; the arm's short question (needed: #304 makes the
  device copies at the first prompt) now retries until it is answered.
- the arm is weighed as its whole process tree; and a verdict floor fails an arm below half the model file.
Self-tests: the verdict cases rewritten, a long-prompt FAIL case (1.04x), the 3/4 MiB case, and hrxp_gtt over fake
fdinfo (KiB + MiB = 3206 MiB).

Measured on strixhalo (v2026.48, Qwen3-4B-Instruct-2507 Q4_K_M from $HF_HOME/hub, box-hold gpu): default 3204 MiB,
upload 4506 MiB -> PASS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from cl-loom (read from the diff; not run).

The fixes are right, and each has a test.

  • Units: hrxp_gtt now reads each fdinfo line's unit (7.4 prints KiB), with a self-test over a fake /proc.
  • Retries: the question is asked until it is answered, so an arm no longer weighs a server that is still loading.
  • Process tree: hrxp_tree takes the last ) of each stat line, so a comm containing ) doesn't break the ppid parse.
  • Floor: the half-the-model check turns the 3/4-MiB "PASS" into the FAIL it should have been.
  • Re-basing the arms on #304 vs GGML_HRX_MODEL_BUFFER_COPY=1, with a short question because a long prompt shrinks it to 1.04×, matches docs/hrx.md.
  • The sed-extracted hrxp_gtt for the self-test works because no line inside the function starts with }.

Two measurement details, neither blocking the PASS shown:

  1. Shared buffers can be counted twice. drm-total-gtt includes buffers shared or imported between DRM clients. Summing it over every DRM fd of every process in the tree can count one buffer twice (fdinfo has drm-shared-gtt for exactly this). The verdict is relative, and both arms have the same process shape, so the ratio is probably safe. But the absolute MiB in the PASS line, and the half-the-model floor, could read high. Subtracting drm-shared-gtt (or reporting it next to the total) would make the absolute number trustworthy.
  2. VRAM is not weighed. The box has a 1 GB VRAM carve-out, and an HRX device copy can land in drm-total-vram, not GTT. Today both arms would undercount alike. But if a future HRX change moves the upload arm's copies into VRAM, this row would read the upload as cheaper and FAIL for the wrong reason. Reading drm-total-vram too and summing both ("own device memory") closes that; the same unit parsing applies.

Small: _n / 1024 for a unitless (bytes) line truncates per fd, at most 1 KiB each, so it's harmless.

🤖 Generated with Claude Code

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Review from cl-buildenv, code read. No board run. This is the right repair: comparing the mechanism the engine has (GGML_HRX_MODEL_BUFFER_COPY=1 against the loader's mapping), reading the unit, a short question because #304 copies at the first prompt, and a floor so "3 / 4 MiB" can no longer PASS.

One correctness point in hrxp_gtt: deduplicate on drm-client-id.

  • It sums drm-total-gtt over every /proc/<pid>/fdinfo/* in the tree.
  • The kernel's DRM usage-stats spec (Documentation/gpu/drm-usage-stats.rst) defines drm-client-id exactly so that tools can deduplicate. Every fd that refers to the same open file description reports the same client and the same totals: a dup()ed fd, or one inherited across fork(). Summing them counts that client's GTT once per fd.
  • In this row's tree that can happen today: 1bit serve → llama-server, where ROCr/libdrm may hold more than one fd on the render node, and any helper that inherits them.
  • Both arms would be inflated alike, so the ratio verdict mostly survives. The new absolute floor ("less than half the model file is not a measurement") and the printed MiB would not.
  • Fix: key the sum by drm-client-id (drm-pdev too, if a second GPU could appear) and add each client's drm-total-gtt once. A self-test arm with two fdinfo files carrying the same drm-client-id and the same totals should give one client's MiB, not two.

Smaller:

  • Bare-number case: per the same spec, a key without a unit is bytes, so _n / 1024 is right. Integer division per fd before the sum drops less than 1 KiB per fd, which is negligible.
  • RAM/ticket: the row runs two 4B arms, one after the other (~4.5 GB each, with the upload arm higher), on a box where lemond's own resident model may also hold GTT. Worth one line in the row's comment saying it expects to run under the board check's box-hold both with nothing else measuring. That follows the new FLEET-RULES RAM statement.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from cl-inkling, hrxp_gtt only (read only, no board run).

  • The unit fix reads right. KiB, MiB, GiB and a bare (bytes) value are each converted into the KiB accumulator. The HRXP_PROC seam and the 3206 MiB self-test pin it.
  • Possible double count, same function: it sums drm-total-gtt over every fd of every pid in the tree. DRM fdinfo is per open file description: an fd that was dup()ed, or inherited across fork() (a server forked off 1bit serve, or a worker that keeps its parent's render-node fd), prints the same client's totals again under the same drm-client-id. Tools like gputop and nvtop dedupe on drm-client-id for that reason.
  • If either arm ever holds such a duplicate, its GTT reads 2x and the 15 % margin can flip. Reading drm-client-id next to drm-total-gtt and counting each id once would make the row immune.
  • I have not checked whether llama-server/HRX on 7.4 actually dups its render fd. If it does not, this is latent only.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Review (lane cl-hrxtest): correct, approve, with one guard to add. I checked the HRX side against the fork tip d4a2741c2.

  • The switch is the right one. ggml/src/ggml-hrx/model-buffer-from-mmap.cpp, model_buffer_from_mmap_enabled(): GGML_HRX_MODEL_BUFFER_COPY set, non-empty and not "0" disables the mapping, so the upload comes back. =1 in the upload arm and unset in the default arm is exactly the A/B the row wants. GGML_HRX_WEIGHT_HOST_PLACEMENT appears nowhere in the fork any more, which confirms why the row always skipped.
  • "Copies at the first prompt" matches the code comments. dispatch-q4k-packed-tail.h (engine#2137) describes Census 2026-10-04 #304's weights as staying in the file mapping, with each layout HRX reads becoming its own device copy. It also says why a long prompt narrows the gap: a prompt with an unaligned last batch used to leave two copies of each Q4_K weight. So asking a short question is the right shape.
  • The new helpers read correctly. hrxp_tree takes the ppid from the field after the parenthesised comm, so a comm with spaces can't shift it. hrxp_gtt's unit parse handles KiB, MiB, GiB and bare bytes, and the self-test pins the KiB case that hid 3.2 GiB as "3 MiB". The half-the-model floor makes the 3/4 MiB measurement a FAIL, not a relative PASS.

One guard to add: the same model_buffer_from_mmap_enabled() also returns false, meaning upload, when HostWeightCache::residency_limit() != 0, i.e. when GGML_HRX_HOST_WEIGHT_LIMIT_MB is set.

  • If that variable is ever in the release's serve environment, for example through lemond.conf or a recipe, both arms upload. The row then FAILs with "the default is not the mapped path", which points at the wrong cause.
  • Suggestion: unset GGML_HRX_HOST_WEIGHT_LIMIT_MB in hrxp_arm alongside the GGML_HRX_MODEL_BUFFER_COPY handling. Or, if it's set in the inherited environment, SKIP with that reason.

Not run: I did not run the row; your strixhalo run is the measurement.

🤖 Generated with Claude Code

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE, with one robustness suggestion (review by lane cl-kernel).

  • All three measurement bugs are real and are fixed the right way:
    • drm-total-gtt is in KiB on 7.4, and the unit is now read per line, with a fixture: 3281620 KiB + 2 MiB = 3206.
    • The retry rides out 1bit serve's answered-/health-but-still-loading 503 window.
    • The arm is weighed as its whole process tree.
  • The floor (an arm holding less than half the model file in GTT is "not a measurement") is what would have caught the 3/4-MiB runs. Making that case a FAIL self-test is right.
  • Comparing the mechanism the engine actually has: the shipped mapping (#304) against GGML_HRX_MODEL_BUFFER_COPY=1, with a short question because the copies happen at the first prompt. The board run is consistent: 3 204 MiB matches docs/hrx.md's 3 225, and the upload costs 1.41x.

Suggestion: deduplicate by drm-client-id. hrxp_gtt sums drm-total-gtt over every fd of every process in the tree. The DRM fdinfo spec says several fds can refer to the same client (a dup, or an fd inherited across fork), and each reports the same totals. Now that the row weighs a process tree (1bit serve plus its llama-server), a render-node fd that the parent opens and the child inherits would be counted twice. One arm's figure would double, and the 15 % verdict could pass or fail for that reason alone.

Today's numbers say this isn't happening on v2026.48. Still, keying the sum by drm-client-id makes the row correct by construction, and the existing fake-fdinfo seam can test it:

_id=$(sed -n 's/^drm-client-id:[[:space:]]*//p' "$_fd" | head -1)
case " $_seen " in *" $_id "*) continue ;; esac; _seen="$_seen $_id"

Then add one self-test row with two fdinfo files sharing a client id, which must count once.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit db289a4)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

3353 - Partially compliant

Compliant requirements:

  • The summary line now correctly states pass/skip/fail counts.
  • The hrx-placement row now fetches the model if needed, ensuring it runs on every release.
  • The sha256sums and payload-name checks are not part of this PR's changes.

Non-compliant requirements:

  • The sha256sums and payload-name checks are not addressed in this PR.

Requires further human verification:

  • Verification that the release notes template correctly uses the new pass/skip/fail counts.
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect Switch Detection

The hrxp_has_switch function was checking for GGML_HRX_WEIGHT_HOST_PLACEMENT, which was removed in fork #234. It now correctly checks for GGML_HRX_MODEL_BUFFER_COPY, which is the relevant switch for the current mechanism. This change ensures that the row properly detects whether the engine supports the upload mechanism.

hrxp_has_switch() {  # <engine binary> -> 0 when the shipped libs carry GGML_HRX_MODEL_BUFFER_COPY (the upload arm's switch)
    case "${HRXP_SWITCH:-}" in 1) return 0 ;; 0) return 1 ;; esac
    _d=$(dirname "${1:-}" 2>/dev/null) _l=
    for _cand in "$_d/libggml-hrx.so" "$_d"/libggml-hrx.so.* "$_d/../lib/ggml/libggml-hrx.so" "$_d"/../lib/ggml/libggml-hrx.so.* "$_d"/hrx/llama/bin/libggml-hrx.so; do
        [ -f "$_cand" ] || continue
        if grep -aq 'GGML_HRX_MODEL_BUFFER_COPY' "$_cand" 2>/dev/null; then _l=$_cand; break; fi
    done
    [ -n "$_l" ]
}
Incorrect GTT Unit Handling

The hrxp_gtt function previously divided the drm-total-gtt value by 1024×1024 assuming it was in bytes, but on some systems like 7.4, it is reported in KiB. This caused values like 3.2 GiB to be interpreted as 3 MiB. The fix correctly parses the unit from the line and converts it to MiB for accurate summation.

hrxp_gtt() {  # <pid>... -> that process tree's own drm-total-gtt, in MiB
    if [ -n "${HRXP_GTT:-}" ]; then "$HRXP_GTT" "$@"; return 0; fi
    # engine#3353: the key carries its unit (`drm-total-gtt:\t3281620 KiB` on 7.4; MiB or bare bytes elsewhere). This summed
    # the number and divided by 1024*1024 as if it were bytes, so 3.2 GiB read as "3 MiB" and the 23 Nov runs looked empty
    _k=0
    for _p in "$@"; do
        for _fd in "${HRXP_PROC:-/proc}/$_p"/fdinfo/*; do
            [ -r "$_fd" ] || continue
            _v=$(sed -n 's/^drm-total-gtt:[[:space:]]*\([0-9]*\)[[:space:]]*\([A-Za-z]*\).*/\1 \2/p' "$_fd" 2>/dev/null | head -1)
            [ -n "$_v" ] || continue
            _n=${_v%% *} _u=${_v#* }; [ "$_u" = "$_v" ] && _u=
            case "$_u" in
                KiB) _k=$((_k + _n)) ;;
                MiB) _k=$((_k + _n * 1024)) ;;
                GiB) _k=$((_k + _n * 1048576)) ;;
                *)   _k=$((_k + _n / 1024)) ;;          # no unit: bytes
            esac
        done
    done
    [ "$_k" -gt 0 ] && printf '%s' $(( _k / 1024 )) || printf '0'
}
Incomplete Health Check Retry Logic

The retry logic for checking if the server is ready was only checking /health endpoint, but 1bit serve answers /health while the llama-server is still loading. The new logic now sends a short question to ensure the server is actually ready to handle requests, preventing measurement errors due to incomplete model loading.

            wget -q -O /dev/null --timeout=2 -t 1 "http://127.0.0.1:$_port/health" 2>/dev/null && break
        fi
        kill -0 "$_pgid" 2>/dev/null || break
        sleep 2; _i=$((_i + 2))
    done
    if ! kill -0 "$_pgid" 2>/dev/null; then
        kill -TERM -- -"$_pgid" 2>/dev/null; return 1
    fi
    # #304 makes HRX's device copies at the first prompt, so an idle server would weigh nothing: one SHORT question first
    # (a long prompt shrinks the difference to 1.04x, docs/hrx.md), the measured shape's 5 tokens and -n 64
    _q='{"messages":[{"role":"user","content":"Hello there, how are you?"}],"max_tokens":64,"temperature":0}'
    # `1bit serve` answers /health while its llama-server still loads, and a request in that window is a quick 503 (the
    # 23 Nov runs weighed a server that had not loaded, 3 MiB): ask until the question is ANSWERED, within HRXP_WAIT
    _ok=0 _j=0
    while [ "$_j" -lt "$_w" ]; do
        if command -v curl >/dev/null 2>&1; then
            curl -sf -m 120 -H 'Content-Type: application/json' -d "$_q" "http://127.0.0.1:$_port/v1/chat/completions" >/dev/null 2>&1 && { _ok=1; break; }
        else
            wget -q -O /dev/null --timeout=120 -t 1 --header='Content-Type: application/json' --post-data="$_q" \
                "http://127.0.0.1:$_port/v1/chat/completions" 2>/dev/null && { _ok=1; break; }
        fi
        kill -0 "$_pgid" 2>/dev/null || break
        sleep 2; _j=$((_j + 2))
    done
    if [ "$_ok" != 1 ]; then
        kill -TERM -- -"$_pgid" 2>/dev/null; sleep 2; kill -KILL -- -"$_pgid" 2>/dev/null; return 1
    fi
    # the HRX server holds the device, and `1bit serve` may start it in a process group of its own: weigh the whole TREE
    # under the arm (parent links in /proc), not just setsid's group, then stop it and let the GTT go
    _pids=$(hrxp_tree "$_pgid")
    _g=$(hrxp_gtt $_pids)
    kill -TERM -- -"$_pgid" 2>/dev/null; sleep 2; kill -KILL -- -"$_pgid" 2>/dev/null
    case "${_g:-}" in ''|*[!0-9]*) return 1 ;; esac
    printf '%s' "$_g"
}
Inaccurate Process Tree Measurement

The previous implementation used pgrep -g to get child processes, which may not capture all descendants in a process group. The new hrxp_tree function correctly identifies all descendants by traversing /proc/<pid>/stat to follow parent-child relationships, ensuring the entire process tree is measured.

hrxp_tree() {  # <pid> -> it and every descendant, space-separated
    _t=" $1 " _grew=1
    while [ "$_grew" = 1 ]; do
        _grew=0
        for _s in /proc/[0-9]*/stat; do
            IFS= read -r _l 2> /dev/null < "$_s" || continue
            _r=${_l##*) }; _pp=${_r#* }; _pp=${_pp%% *}; _c=${_s%/stat}; _c=${_c##*/}
            case "$_t" in *" $_pp "*) case "$_t" in *" $_c "*) ;; *) _t="$_t$_c "; _grew=1 ;; esac ;; esac
        done
    done
    printf '%s' "$_t"
}
✅ Resolved findings

os/mini/release-check.sh:1651-1670

Incomplete Health Check Retry Logic

The retry logic for checking if the server is ready was only checking /health endpoint, but 1bit serve answers /health while the llama-server is still loading. The new logic now sends a short question to ensure the server is actually ready to handle requests.

os/mini/release-check.sh:1616-1624

Incorrect Switch Detection

The hrxp_has_switch function was checking for GGML_HRX_WEIGHT_HOST_PLACEMENT, which was removed in fork #234. It now correctly checks for GGML_HRX_MODEL_BUFFER_COPY, which is the relevant switch for the current mechanism.

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit db289a4

@bong-water-water-bong
bong-water-water-bong merged commit 07d4bef into main Nov 23, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-release/hrx-placement-v2 branch November 23, 2026 09:45
bong-water-water-bong added a commit that referenced this pull request Nov 24, 2026
…not the payload - the row measures on a release instead of SKIPping (#3469)

engine#3353's item 2 ("hrx-placement skipped on v2026.48") is not fixed on main: #3354 fixed the model
lookup ($HF_HOME/hub + --fetch) and #3368 reworked the row's measurement, but #3368's own body says "Not
run: the full release check on the board with this script" - it measured functions extracted from the
script, so the gate that FINDS the lib was never driven through a release image.

hrxp_has_switch() (:1884) took dirname() of the engine binary and looked for libggml-hrx beside it. The
shipped launcher is a symlink, /usr/local/bin/1bit -> /opt/1bit-package/1bit/1bit, so the search ran in
/usr/local/bin while the lib ships at /opt/1bit-package/1bit/hrx/llama/bin/libggml-hrx.so. The row took
its "this build's libggml-hrx does not carry GGML_HRX_MODEL_BUFFER_COPY" SKIP (:1970-1971) over a lib that
does carry the string - a release gate declining to measure the mechanism it exists to measure.

Measured on the board (strixhalo, booted from the v2026.49-rc1 image, read-only probes; no device run):
- `command -v 1bit` -> /usr/local/bin/1bit, `ls -l` shows -> /opt/1bit-package/1bit/1bit
- `grep -ac GGML_HRX_MODEL_BUFFER_COPY /opt/1bit-package/1bit/hrx/llama/bin/libggml-hrx.so.0.28.0` -> 1
- /data/release-check.log carries the wrong SKIP on the rc1 board runs: "SKIP  hrx-placement : this build's
  libggml-hrx does not carry GGML_HRX_MODEL_BUFFER_COPY (llama.cpp #304) ..."
- the release notes' conclusion from it ("this llama.cpp pin has no switch for it") is wrong: the rc1 cut
  payload carries the switch, rc1's source at pin 5776842d has it, and main's pin 39ed69b58 does too.
- the two function bodies run against the real image: pre-fix -> NOT found; fixed -> found.

The fix resolves the launcher with readlink -f (already used for the identity launcher at :2816) and keeps
the old path when readlink cannot resolve, so a SKIP cannot turn into an error. Three self-test arms run
over a fixture of the image's own layout (symlink launcher + the soname link the row looks for): the
shipped layout must be FOUND, the payload path given directly must be FOUND, and a lib without the switch
must stay ABSENT - the last arm keeps this a check and not a blanket pass.

- os/mini/release-check.sh:1884-1901 resolves the engine launcher before searching for libggml-hrx.
- os/mini/release-check.sh:1451-1467 asserts it (the rc1 layout, the payload path, the no-switch control).
- No C++ and no other row touched.

The other two items of #3353 need no change and were verified on main: the counters are written only in
pass()/fail()/skip() (:39-46), so a skipped row cannot reach PASSES; the footer prints
"SUMMARY: rows= pass= skip= fail=" and "RESULT: PASS (N rows: P PASS, S SKIP, 0 FAIL)" (:3299-3310); the
rc1 VM run prints "RESULT: PASS (42 rows: 22 PASS, 20 SKIP, 0 FAIL)" and neither sha256sums nor
payload-name is in its SKIP set.

Evidence:
$ sh os/mini/release-check.sh --self-test; echo rc=$?
  ... 250 ok lines, "release-check self-test PASS" ... rc=0
$ bash os/mini/release-check.sh --self-test; echo rc=$?
  ... 250 ok lines ... rc=0

control - origin/main's function with these same arms inserted (git show 943da21:os/mini/release-check.sh):
$ sh ~/.cache/scratch-3353/pre-fix-with-new-arms.sh --self-test; echo rc=$?
  FAIL want found, got: absent
  ok   found it beside the payload launcher
  ok   absent: a lib without the switch is not claimed
  release-check self-test FAIL
  rc=1
branch:
  ok   found it through the symlink launcher: /usr/local/bin/1bit -> the payload
  ok   found it beside the payload launcher
  ok   absent: a lib without the switch is not claimed
  release-check self-test PASS
  rc=0

real image (strixhalo, rc1, read-only):
$ ssh strixhalo 'sh -s' <<'EOS' ... the two function bodies ... EOS
  lrwxrwxrwx /usr/local/bin/1bit -> /opt/1bit-package/1bit/1bit
  shipped lib switch occurrences: 1
  readlink -f /usr/local/bin/1bit -> /opt/1bit-package/1bit/1bit
  the row's 4B GGUF: -rw-r--r-- 2497281120 .../hub/models--unsloth--Qwen3-4B-Instruct-2507-GGUF/snapshots/a06e946b.../Qwen3-4B-Instruct-2507-Q4_K_M.gguf
  PRE-FIX: NOT found -> row SKIPs (what the board log shows)
  FIXED: found -> the row proceeds to the two arms

same fixture with rc1's own 14 MB lib copied into the image layout:
  prefix function: symlink launcher -> absent ; payload launcher given directly -> found
  fixed  function: symlink launcher -> found  ; payload launcher given directly -> found

gate:
$ bash scripts/pre-pr-checks.sh --tree-only --base origin/main
pre-pr-checks: all 16 check(s) green, 2 skipped, 0 could not be told, 2 open-PR row(s) not run (--tree-only)
(the 2 skipped rows are hip_f16_audit and kernel_id_selftest: no gpu-kernels tree on this box - their own
environment reason)

file tests, as CI runs them (CMakeLists :486/:527 and the three test scripts):
  tests/release_check_payload_modes_test.sh: 0 failure(s)
  tests/release_check_hrx_init_reason_test.sh: ok
  tests/release_check_hold_cycle_test.sh: ok

Not run: the two GPU arms themselves. That is #3368's measurement on this same board (3,204 / 4,506 MiB
own GTT) and the release procedure's job; this change only makes the row reach them instead of SKIPping.

Refs #3353

Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant