Repository navigation
engram, qdot: two hw tests on aarch64 read O_DIRECT from libc and name a CPU without row lanes - #43
Merged
Conversation
…e a CPU without row lanes
- engram: hw_engram_open_direct_reads_the_files_bytes masked the fdinfo flags with 0o40000, which is O_DIRECT on x86_64.
On aarch64 O_DIRECT is 0o200000 (0o40000 is O_DIRECTORY there), so the clause was red on a handle that carries the
flag (flags 2600000: O_CLOEXEC, O_LARGEFILE, O_DIRECT). It masks with libc::O_DIRECT, the flag
crates/engram/src/direct.rs opens with.
- qdot: hw_lanes_refuse_bad_shapes asserted its refusals on a CPU without row lanes, where pack_lanes refuses every
shape as NoLanes first, so the first shape clause was red as an unnamed assert_eq (NoLanes(Q4_K) against
UnalignedK { k: 100, gran: 256 }). It asserts has_lanes(Q4_K) first, as assert_lanes_match does, so the red names the
CPU.
On x86_64 libc::O_DIRECT is 0o40000 and the box's CPU has the lanes, so neither test changes there.
FAIL-first on a DGX Spark (aarch64, GB10): before, gate-engram passed 22 of 29 with the O_DIRECT clause red and
gate-qdot's lane refusal clause red unnamed; after, 23 of 29 and the clause green, and the lane refusal red by name. The
other reds there are the same on both trees: inputs that machine does not have or cannot read, clauses already named for
a CPU without the AVX2 kernels, and one engram page-cache eviction red this change does not touch.
Owner
|
Thanks — clear fix, and the box (x86_64) sees no change. It lands right after the 0.3.0 tag tonight: I run its gates (qdot, engram) on top of the release tree, then merge it here. |
7 tasks done
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.
What and why
Part of #13. Two hw tests are red on a DGX Spark (aarch64) because of the tests themselves; #38's description lists
both among the fixture-tier reds that are not an input. The engram test checks the fdinfo flags against x86_64's
O_DIRECTvalue, and the qdot lane refusal test fails unnamed on a CPU without row lanes.hw_engram_open_direct_reads_the_files_bytesmasks the flags with0o40000, which isO_DIRECTon x86_64. Onaarch64
O_DIRECTis0o200000(0o40000isO_DIRECTORYthere), so the clause is red on a handle that carries theflag:
flags 2600000isO_CLOEXEC | O_LARGEFILE | O_DIRECT. It now masks withlibc::O_DIRECT, the constantcrates/engram/src/direct.rsopens the file with.hw_lanes_refuse_bad_shapesassertspack_lanes's shape refusals. On a CPU without row lanes every shape is refusedas
NoLanesfirst, so the first shape clause (k = 100) fails as a bareassert_eq. The test now assertshas_lanes(Q4_K)first, asassert_lanes_matchdoes, so on such a CPU it is red with a message that names the CPU.It stays red there; it does not skip.
On x86_64
libc::O_DIRECTis0o40000and the box's CPU has the lanes, so neither test changes on the box.Code shape
libcconstant the reader opens with, instead ofits own copy of the x86_64 value.
clauses.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": the literal0o40000atcrates/engram/tests/engram.rs:776was an x86_64-only copy of
libc::O_DIRECT.What I ran
On a Mac, on this commit (on
aa6df234).mac-staticcross-lints the x86_64 Linux build, these two test filesincluded:
(the other steps rc 0 too, each line cut after its time; the lint step counts 41 warnings, the ratchet's 41).
For the aarch64 side, clippy on the DGX Spark in the dev container, on
aa6df234and on this commit:Both trees print the same diagnostics, none in
crates/engram/tests/engram.rsorcrates/qdot/tests/qdot.rs.FAIL-first on the DGX Spark, in the dev container, each recipe's
tools/gate.shline at the tree root(
bash tools/gate.sh --release -p bloomery-engram --lib --test engram -- --include-ignored --nocaptureandbash tools/gate.sh --release -p bloomery-qdot --test qdot -- --include-ignored --nocapture). Both gates exit 101 onboth trees, for the reds below:
aa6df234On
aa6df234:On this commit:
The other reds are the same names on both trees. In engram, five miss the V4.1 engram table under
/models, andhw_engram_expert_stack_evicts_and_reads_backfinds 2 of 7 pages still in the page cache after an eviction; I have notfound the cause of that one, and this change does not touch it. In qdot, 24 of the 38 reds are inputs that run did not
have or could not read (model files, and reference dumps at the default
$BLOOMERY_DATA, which the container's usercould not read), 13 are clauses already named for a CPU without the AVX2 kernels, and the last is
hw_lanes_refuse_bad_shapes, now named the same way.I could not run either gate on x86_64. There
libc::O_DIRECTis the old literal andhas_lanes(Q4_K)holds, so bothtests should read as before; that run is yours.
Hardware (if the change is for a machine)
DGX Spark:
nvidia-smi --query-gpu=name,driver_version --format=csvprintsNVIDIA GB10, 595.84. CPU: 20 cores(10 Cortex-X925, 10 Cortex-A725),
MemTotal127,599,376 kB. Ubuntu 24.04.5 LTS, kernel 6.17.0-1032-nvidia. The gatesand clippy ran in the dev container (CUDA 13.3.1, LLVM 21.1.8,
nightly-2026-08-28) withLC_ALL=C.