Repository navigation
bump-hrx: fix the output-key mismatch and modify/delete conflicts - #354
Merged
bong-water-water-bong merged 4 commits intoOct 7, 2026
Merged
Conversation
…/delete conflicts
…-tags the same commit)
… an Issues-scoped PAT
bong-water-water-bong
enabled auto-merge (squash)
October 7, 2026 20:56
bong-water-water-bong
deleted the
fix/bump-hrx-output-key-and-modify-delete
branch
October 7, 2026 20:59
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
bong-water-water-bong
pushed a commit
that referenced
this pull request
Nov 20, 2026
…it was registered with (engine#3003)
`add_test(NAME npu_dmabuf_import COMMAND npu_dmabuf_import_test "")` passes an EMPTY STRING, so the
test's `argc < 2` guard never fires: argv[1] is "", the ELF open fails, and the throw is uncaught.
$ build/npu_dmabuf_import_test "" # what ctest ran
terminate called after throwing an instance of 'std::runtime_error'
what(): npu runtime: invalid program file (code 401)
rc=134 # and SKIP_RETURN_CODE 77 does not match, so the row is red
$ build/npu_dmabuf_import_test # registered with no argument now
skip: no kernel ELF given (`npu_dmabuf_import_test <kernel.elf>`); the executing arm needs one device ELF
rc=77
and ctest agrees: `1/1 Test #354: npu_dmabuf_import ... ***Skipped 0.00 sec`, `100% tests passed`.
A box with no ELF to pass now registers a skip, which is what the row's own comment already claimed
it did (engine#3003 review).
bong-water-water-bong
added a commit
that referenced
this pull request
Nov 20, 2026
…ad of guessing (engine#3003) (#3018) * npu: the dma-buf test sizes its buffers from the ELF, and skips instead of guessing (engine#3003) `npu_dmabuf_import_test` bound every argument but the import from a constant -- `size_t(1) << 20`, with the comment "plain BOs, sized generously (transport, not semantics)" -- and the import from another constant, 128 KiB. On 2026-11-20 that cost a fault burst: given a 2048x3072 int8 QKV ELF, argument 1's 1 MiB BO is 6x smaller than the 6 MiB the program reads through it, and the device read past its end -- ten IO_PAGE_FAULTs (amdxdna 0000:c6:00.1, domain 0x0002, flags 0x0007) in one second, measured. It also cost another lane its GPU hold mid-load, so "the run completed" was the wrong test of a buffer size. The runtime already reads each argument's transfers from the unpatched control code (npu_rt_bounds.h, npu-kernels#100). That reading is now on the engine's side of the API: struct arg_need { uint64_t bytes; uint32_t checked, unchecked; bool transfers() const; }; arg_need elf::get_arg_need(const std::string& kernel, int index) const; and the test sizes every buffer from it. Where it cannot -- a stepped or iterated descriptor, a control-packet site, no descriptors at all -- it SKIPS (77) with the argument and the counts, because a size for such an argument is a guess and a guess is what overran. The import keeps a floor of 128 KiB (the kvwrite payload argument 0 is read as) and takes argument 0's own need above it. Measured on this box, device-free: the ELF that faulted now skips before the device is opened $ build/npu_dmabuf_import_test families/lfm3-17b-qkv6144/full_i8_QKV_K2048_N3072_m16.elf \ main:seq --args 3 --skip-negative skip: … argument 0 has 96 transfer descriptor(s) this ELF does not describe (checked 0, unchecked 96), so a buffer size for it would be a guess; … (engine#3003) rc=77 and the count matches the runtime's own dump for that ELF (`0 descriptors checked, 96 not checkable`), so the number reaches the engine side of the API intact. Every sealed serve/generated ELF in families/lfm3-17b-qkv6144 is stepped, so this row now skips on all of them rather than launching at them: that is the intended outcome until an ELF with linear descriptors is shipped for it. `npu_rt_shim_test`, `npu_gemm_shape_guard_test` and `1bit` still link (BUILD_RC=0). The forwarder itself is in the private runtime (npu-kernels#105), so this needs that pin's pair. * npu: the dma-buf row skips instead of aborting on the empty argument it was registered with (engine#3003) `add_test(NAME npu_dmabuf_import COMMAND npu_dmabuf_import_test "")` passes an EMPTY STRING, so the test's `argc < 2` guard never fires: argv[1] is "", the ELF open fails, and the throw is uncaught. $ build/npu_dmabuf_import_test "" # what ctest ran terminate called after throwing an instance of 'std::runtime_error' what(): npu runtime: invalid program file (code 401) rc=134 # and SKIP_RETURN_CODE 77 does not match, so the row is red $ build/npu_dmabuf_import_test # registered with no argument now skip: no kernel ELF given (`npu_dmabuf_import_test <kernel.elf>`); the executing arm needs one device ELF rc=77 and ctest agrees: `1/1 Test #354: npu_dmabuf_import ... ***Skipped 0.00 sec`, `100% tests passed`. A box with no ELF to pass now registers a skip, which is what the row's own comment already claimed it did (engine#3003 review). * pins: npu-runtime 2485455a -> 8fe45b01, the commit that defines what this branch calls (engine#3003) npu-kernels#105 merged as `8fe45b01` on npu-dx: it is the first runtime that defines `npu_rt_api::elf::arg_need`/`get_arg_need` and `bounds::judge_import_size`, so it is the first pin at which this branch links. Without it the two NPU targets fail with the undefined reference engine#3003 opens with, which is why the PR waited rather than shipping a declaration with no definition behind it (review on this PR asked for exactly this: bump the pin here so the pin check is the gate CI can see). Proof at the pin, in this worktree with ONEBIT_NPU_RT_DIR checked out at `8fe45b01`: [4/6] Linking CXX executable npu_rt_shim_test [5/6] Linking CXX executable npu_dmabuf_import_test BUILD_RC=0 (onebit, npu_rt_shim_test, npu_dmabuf_import_test, npu_gemm_shape_guard_test) plus the two engine-side arms, both device-free because they stop before the device opens: $ build/npu_dmabuf_import_test <lfm3 qkv elf> main:seq --args 3 -> rc=77, "argument 0 has 96 transfer descriptor(s) this ELF does not describe (checked 0, unchecked 96)" $ build/npu_dmabuf_import_test <lfm3 qkv elf> -> rc=1, "FAIL …: npu runtime: unsupported program (code 502): main:sequence" (a wrong kernel name used to abort with a core) and the arm the review of npu-kernels#105 asked for, now that its guard exists: an import claiming 64 KiB more than the dma-buf holds must be refused (`--skip-negative` turns it off). It cannot be exercised on this box -- every sealed serve ELF here is stepped, so the row skips before the device opens -- and that is said in the PR rather than implied by a green run. --------- Co-authored-by: bong-water-water-bong <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects exposed by running the sync by hand after the token permission was fixed.
1. The bump PR step could never succeed. The hrx-system step writes its output as
hrx_rebased, but the PR step readssteps.hrxfork.outputs.rebased, soHRX_REBASEDarrives empty andgit update-index --cacheinfo "160000,,third_party/hrx-system"dies witherror: option 'cacheinfo' expects <mode>,<sha1>,<path>(exit 129). Confirmed in run 37673167688:REBASED: e44c9d01a4d5...populated,HRX_REBASED:blank.2. The conflict loop cannot survive a modify/delete. Every conflict under
ggml/src/ggml-hrx/is resolved withgit checkout --ours, but our line has deleted at least one file AMD still changes -kernel-corpus/kernels/loom-libs/motifs/matmul/vector_decode_pair.loom(base 22966 bytes, ours deleted, AMD 25042).git checkout --ourserrors on a path we do not have, the merge is left uncommitted, andgit commitfails with "Committing is not possible because you have unmerged files". Keeping our deletion preserves the line that passes the HRX0 gate.Also worth noting for the token: the
Report a failed sync so it cannot break silentlystep still fails withGraphQL: Resource not accessible by personal access token (addComment)- HRX_BUMP_TOKEN needs Issues: Read and write on this repo before that step can do its job.