Skip to content

train 1124193527: #4802 #4894 (CI only) - #4943

Closed
ashhart wants to merge 11 commits into
mainfrom
lead/train-1124193527
Closed

ashhart wants to merge 11 commits into
mainfrom
lead/train-1124193527

Conversation

@ashhart

@ashhart ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #4802 #4894 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

ashhart and others added 11 commits November 24, 2026 19:35
Issue #4778: the hard-coded B70 ID refused Arc Pro B60 before any kernel ran. Share Flash Next detection with Qwen27 and tp_bench; XPU_DEVICE_ID still overrides discovery. The fake-opener host contract covers 0xe211 and 0xe223 without a device.
…evice-id tests

qwen27.zig and flashnext/xpu_store.zig now import device_id, but hostTests()
gave it only to the device-id test, so test-draft-xpu-host and
test-slide-xpu-host could not compile (no module named 'device_id' within
'xpu_qwen27' / 'flashnext_xpu'). The host device_id module (on ze) is built
once, before both host modules, and all three use it.
detectDeviceId opens Level Zero's libze_loader.so.1 with std.DynLib, which
std does not provide for Windows, so test-xpu-device-id-host could not compile
there ("unsupported platform"). After the XPU_DEVICE_ID override, a non-Linux
build now returns error.LoaderUnavailable, the error a Linux host without the
loader already gets. The check is comptime: Linux compiles exactly as before.
tail_test.zig, means_test.zig, seam_test.zig and close_test.zig import
qwen27.zig, which now imports device_id, so compile-xpu-qwen27-tail-host,
compile-xpu-qwen27-tail-linux and xpu-qwen27-tests failed the same way
(no module named 'device_id' within 'root'). The host check takes the host
device_id module, the Linux cross-compile its own on ze_linux, and the device
tests the engine's device_id_mod.
… dot the serial chain

Each expert product ran one 32-thread group a route pair, its lanes looping
over the pair's outputs: 36 outputs a lane for GU (n 1152), 72 for down
(n 2304), and eight groups a decode step. Combine ran one group a token.

The four products and the combine now launch threadgroups along the outputs
by route pairs (or tokens), one thread an output. Each thread runs the same
ink2_dot_nv / ink2_dot_mx as before: one FP32 chain from column 0 up, every
product rounded before its add (fp contract off), then the same BF16 rounding
and activation. Combine keeps its ascending-expert loop. Only which thread
computes an output changes, so every output is bit-identical to the serial
reference. Threads past the row return before any read. Launches stay
32 threads, so the existing records hold; the quantize kernels are unchanged.

The grid of outputs by route pairs and launchGrid follow #4448's
2f386ca; its lane-strided partial sums and simd_sum, which change the
FP32 sum order, are not taken.

Tests: test-inkling2-controls-host checks the source keeps both dots serial
with no simd_sum and launches every product and the combine one output a
thread (fails before: five lane loops), and that the grid covers every output
exactly once, with no thread past the row reading. The block count rounds
up as n / 32 plus one for a remainder, so the largest u32 widths (4294967265
through 4294967295) take 134217728 blocks instead of overflowing n + 31; a
test asserts those widths and fails on the n + 31 form.

Co-authored-by: Seth For Privacy <40500387+sethforprivacy@users.noreply.github.com>
… kernels

The contract's expert cells ran products of at most 12 outputs a pair and
combines of at most 12 a token, so only the first output block of the new
grid ever ran, and they compared with a float64 bound, not with main's bytes.

Each of the five operations the grid changed (NVFP4 and MXFP8 GU and down,
and the combine) now has a cell that replaces main's kernel: main's
experts.metal at 5e39051, frozen under baselines/, on main's own launch
(one 32-thread group a route pair, a token for the combine, each lane
looping over its outputs). On the same inputs, every output byte of the new
grid must equal main's. The shapes are several output blocks with tails
(n 65, 64, 63 and the 1, 31, 32, 33 edges), Mini's own widths (GU k 2304 n
1152, down k 1152 n 2304, combine n 2304) and 64 rows (128 route pairs).
The float64 reference now holds dots of 2304 terms.

Two planted grid faults go into all five kernels, each a control at the
shapes gate: every output block past the first returning before it
writes, and the pair (token) index halved so two pairs write one row.
@ashhart ashhart closed this Nov 24, 2026
@ashhart ashhart reopened this Nov 24, 2026
@ashhart

ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Landed: #4802 #4894 as main 7aadce5. This PR only carried their CI.

@ashhart ashhart closed this Nov 24, 2026
@ashhart
ashhart deleted the lead/train-1124193527 branch November 24, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant