Skip to content

Release rehearsal 2 fixes: libomp packed, package-check log, drop --build, HRX e2e skip, checksums, image PATH - #472

Merged
bong-water-water-bong merged 3 commits into
mainfrom
1bit/rehearsal-2-fixes
Oct 20, 2026
Merged

bong-water-water-bong merged 3 commits into
mainfrom
1bit/rehearsal-2-fixes

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Fixes from release rehearsal 2 (ryzen, main 4e4e3be, 20 Oct). The full pipeline ran end to end there; VMTEST PASS; a clean clone built from the binary drop.

fix change proof
A weekly.sh package checks use tee >(cat >&2); tee /dev/stderr reopened and truncated package-checks.log log has 0 NUL bytes and all 5 check lines (before: lines lost, NUL-filled)
B new scripts/pack-elf.sh (package-linux.sh's former fix() + strip, RPATH-leak and missing-library checks), used by package-linux.sh and make-binary-drop.sh --build make-binary-drop.sh --build passes (before: 11 RPATH failures)
C libomp.so (LLVM OpenMP, Apache-2.0 WITH LLVM-exception, credited in NOTICE-BINARY) packed beside the libraries that load it, RUNPATH $ORIGIN; package and drop checks fail if ldd finds anything missing beyond TheRock's documented runtime clean clone with libomp nowhere on the system, built from the --build drop: ctest 37/37 incl. serve_e2e_cpu (before: fails, libomp.so not found)
D serve_e2e_hrx exits 77 (skip) without a gfx1151 (scripts/gpu-targets.sh, sysfs only, opens no GPU; ONEBIT_HRX_E2E_TARGETS); held-bump reason names the host and its GPUs ryzen ctest 38/38 with the skip
E SHA256SUMS rewritten after changes.json sha256sum -c passes for all 4 files
F 1bit OS: /etc/profile for SSH login shells (Dropbear's own PATH) and lemonade/lemond linked into /usr/bin VMTEST PASS incl. new "lemonade CLI over SSH" check
G release stage writes [] when bumps.json is missing (running the stage alone crashed) release stage alone passes

All runs with ROCR_VISIBLE_DEVICES=-1, no GPU or NPU use. tools/copyright.py --check clean. Evidence: ryzen ~/wt/tosreh2-REPORT.md.

🤖 Generated with Claude Code

bong-water-water-bong and others added 2 commits October 20, 2026 12:44
…age PATH

The 2026-10-20 rehearsal on ryzen (engine 4e4e3be) found:

- weekly.sh: package_checks listed files with `tee /dev/stderr`, which reopens
  package-checks.log with O_TRUNC; the log kept only its last line behind NUL
  bytes. Use `tee >(cat >&2)`.
- make-binary-drop.sh --build copied build-tree ELFs with their build RUNPATHs
  and its own check refused them. package-linux.sh's RPATH fix() and strip move
  into scripts/pack-elf.sh, shared by both.
- The HRX llama.cpp libraries need libomp.so (TheRock's LLVM) and nothing packed
  it: the packed llama-server, CPU path included, only loaded where TheRock sat
  at the build machine's path. pack-elf.sh copies it beside them ($ORIGIN);
  credited in NOTICE-BINARY and NOTICE (Apache-2.0 WITH LLVM-exception). The
  package checks and the drop now fail when ldd finds a library missing
  (TheRock's documented runtime aside), with ROCR_VISIBLE_DEVICES=-1.
- serve_e2e_hrx failed instead of skipping without a gfx1151 and held every
  bump on such a host. It skips (77) unless scripts/gpu-targets.sh (sysfs, no
  GPU opened) finds one; a held bump names the host and its GPU.
- SHA256SUMS was written before changes.json; the release stage rewrites it.
- 1bit OS: SSH sessions lacked /opt/lemonade/bin. init writes /etc/profile and
  links lemonade/lemond into /usr/bin; vmtest checks the CLI over SSH.

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

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 30f32ad)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Possible Issue

The script scripts/gpu-targets.sh may not correctly handle cases where the gfx_target_version field in /sys/class/kfd/kfd/topology/nodes/*/properties is not a valid integer or contains unexpected formatting, which could lead to incorrect or skipped GPU target detection. This could cause HRX e2e tests to skip incorrectly on machines with valid AMD GPUs.

for p in /sys/class/kfd/kfd/topology/nodes/*/properties; do
    [ -r "$p" ] || continue
    v=$(awk '$1 == "gfx_target_version" {print $2}' "$p")
    [ -n "$v" ] && [ "$v" != 0 ] || continue          # CPU nodes report 0
    # gfx_target_version is major*10000 + minor*100 + stepping; gfx names minor and stepping in hex
    printf 'gfx%d%x%x\n' $((v / 10000)) $((v / 100 % 100)) $((v % 100))
done | sort -u
Possible Issue

In scripts/make-binary-drop.sh, the pack_localize function may not correctly handle cases where libraries are symlinked or when the ldd output does not match the expected format, potentially leading to missing libraries in the packed release.

. "$(cd "$(dirname "$0")" && pwd)/pack-elf.sh"

src=${1:-}; out=${2:-}
[ -n "$src" ] && [ -n "$out" ] || usage; shift 2
build="" package="" npu_lib="" npu_rt="" version=""
while [ $# -gt 0 ]; do
    case "$1" in
        --build) build=${2:?}; shift 2 ;;
        --from-package) package=${2:?}; shift 2 ;;
        --npu-lib) npu_lib=${2:?}; shift 2 ;;
        --npu-rt) npu_rt=${2:?}; shift 2 ;;
        --version) version=${2:?}; shift 2 ;;
        -h|--help) usage ;;
        *) die "unknown argument '$1'" ;;
    esac
done
src=$(cd "$src" && pwd)
mkdir -p "$out"
out=$(cd "$out" && pwd)

for f in LICENSE-BINARY NOTICE-BINARY LICENSE NOTICE config/npu-runtime.config config/gpu-kernels.config \
         scripts/package-linux.sh; do
    [ -f "$src/$f" ] || die "$src has no $f: not an engine checkout"
done
Possible Issue

The pack_missing_libs function in scripts/pack-elf.sh relies on ROCR_VISIBLE_DEVICES=-1 to prevent GPU access, but if this environment variable is not properly respected or if the system has a different setup, it could lead to false positives in library detection.

pack_missing_libs() {
    local f lib miss
    while IFS= read -r -d '' f; do
        pack_is_elf "$f" || continue
        miss=""
        for lib in $(ROCR_VISIBLE_DEVICES=-1 ldd "$f" 2>/dev/null | awk '$2 == "=>" && $3 == "not" {print $1}' | sort -u); do
            _pack_matches "$lib" "$PACK_EXTERNAL_LIBS" || miss="$miss $lib"
        done
        [ -z "$miss" ] || echo "${f#"$1"/}:$miss"
    done < <(find "$1" -type f -print0)
}
Possible Issue

The HRX e2e test in tests/serve_e2e.sh uses a simple string matching approach to check for GPU targets, which might not be robust enough to handle cases where the output from scripts/gpu-targets.sh is formatted differently or contains unexpected whitespace.

if [ "$device" = hrx ]; then
    have=$("$(cd "$(dirname "$0")/.." && pwd)/scripts/gpu-targets.sh" 2>/dev/null | tr '\n' ' ')
    want=${ONEBIT_HRX_E2E_TARGETS:-gfx1151}
    found=0
    for t in $want; do case " $have" in *" $t "*) found=1 ;; esac; done
    [ $found = 1 ] || { echo "skip: no $want GPU for HRX on this machine (GPUs: ${have:-none})"; exit 77; }
fi

@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) October 20, 2026 16:40
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 30f32ad

@bong-water-water-bong
bong-water-water-bong merged commit 55929b5 into main Oct 20, 2026
8 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/rehearsal-2-fixes branch October 20, 2026 16:44
bong-water-water-bong pushed a commit that referenced this pull request Nov 21, 2026
…5691d31, together (engine#679, #3085, #3123)

Two pins in one PR because they only work together: fork #472 asks the add-on for GET_ROWS tensor claims, and
gpu-kernels #123 is the claim. Either alone leaves the other half missing.

  llama.cpp   4f094d611e  test-hrx-ops: the next_q8 rows accept the add-on tree and say so (engine#3085) (#471)
              48d7eeb7c0  test-hrx-ops: the flash-attention rows expect the specialization the matchers actually set (#470)
              3514f3a840  hrx: a GET_ROWS no fork form takes is asked of the add-on tensor claims before it is refused (engine#679) (#472)
  gpu-kernels ac5691d310  hip-hrx: hip.get_rows_f16, GET_ROWS of strided f16 rows into f32, so the QSA indexer-cache
                          gathers stay on HRX (engine#679) (#123)

Measured effect of the pair, from the fork #472 body: engine#679 Flash-Next 19k decode 8.0-8.5 -> 13.7-17.8 tok/s.

#471 is the half of engine#3085 no pin has carried yet: in an add-on tree the four FA rows were 1/4 at 53ab4140 and 2/4 at
9ad20054, and the two that failed (`fa_decode_next_q8.`, `.true`) failed on `plan.dispatches.size()`, which #471 relaxes.

#472 is the only commit here that is not test-only (`ggml/src/ggml-hrx/ggml-hrx.cpp` +6, `tests/test-backend-ops.cpp` +4) —
it adds a claim path, it does not touch `gguf_architectures.hrx`, so the registry's class tables cannot change from it.
The gpu-kernels commit does change the add-on's kernel id/name tables (+2/-1 aliases, +4/-2 ids), which is why the two
travel together.
bong-water-water-bong added a commit that referenced this pull request Nov 21, 2026
…5691d31, together (engine#679, #3085, #3123) (#3141)

Two pins in one PR because they only work together: fork #472 asks the add-on for GET_ROWS tensor claims, and
gpu-kernels #123 is the claim. Either alone leaves the other half missing.

  llama.cpp   4f094d611e  test-hrx-ops: the next_q8 rows accept the add-on tree and say so (engine#3085) (#471)
              48d7eeb7c0  test-hrx-ops: the flash-attention rows expect the specialization the matchers actually set (#470)
              3514f3a840  hrx: a GET_ROWS no fork form takes is asked of the add-on tensor claims before it is refused (engine#679) (#472)
  gpu-kernels ac5691d310  hip-hrx: hip.get_rows_f16, GET_ROWS of strided f16 rows into f32, so the QSA indexer-cache
                          gathers stay on HRX (engine#679) (#123)

Measured effect of the pair, from the fork #472 body: engine#679 Flash-Next 19k decode 8.0-8.5 -> 13.7-17.8 tok/s.

#471 is the half of engine#3085 no pin has carried yet: in an add-on tree the four FA rows were 1/4 at 53ab4140 and 2/4 at
9ad20054, and the two that failed (`fa_decode_next_q8.`, `.true`) failed on `plan.dispatches.size()`, which #471 relaxes.

#472 is the only commit here that is not test-only (`ggml/src/ggml-hrx/ggml-hrx.cpp` +6, `tests/test-backend-ops.cpp` +4) —
it adds a claim path, it does not touch `gguf_architectures.hrx`, so the registry's class tables cannot change from it.
The gpu-kernels commit does change the add-on's kernel id/name tables (+2/-1 aliases, +4/-2 ids), which is why the two
travel together.

Co-authored-by: bong-water-water-bong <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Nov 21, 2026
…e swiglu row fix (engine#3120) (#3169)

Fork #475 squashed as 78092612d ("the packed-weight layout belongs to the route that ran,
not to the row") and #477 as "the two layouts the swiglu rows choose between must differ"
are both on the fork's line and neither is in main's pin, which still points at the #472
squash (3514f3a84085, merged 06:12Z; #475 merged 08:00Z).

What the bump fixes: eight dense_matmul_swiglu.q4_k.q4_k rows fail on
hrx-ops-test.cpp:453 (binding.layout == kQ4KPackedK256Row64Layout) in an add-on build even
with #465's per-row acceptance, because the packed K256/row64 layout is a fact about the LOOM
kquant route and the add-on reads the weight stored (#2392). The #477 commit adds the
distinctness arm that keeps the two-route choice from collapsing into one value.

  git merge-base --is-ancestor 78092612d <new pin>   ->  yes

registry/architectures.json carries the same sha in the same commit, as every bump does.

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