Repository navigation
Conversation
d162ac9 to
8d48cf9
Compare
… family The Metal engine's tree round (picks, each tree's verified path, the commit steps that read it) as shared CUDA kernels: tf_round_bf16_argmax, tf_tree_round_match over a batch of trees (tree-local parents, per-tree budget and EOS ids), and keep rows / gather rows / keep head for the commit. Results use core/tree_round's Result layout, so decode() reads them as-is. tf-cuda-test tree-round checks argmax against rowArgmax (ties, NaN, +-inf, padding past vocab), 4096 batched random trees against oracle() and decode() (every stop and status, full 16-row paths), trees alone against the batch, and the commit kernels against the host; four kernel mutations are caught.
8d48cf9 to
9c0c93a
Compare
|
Rebased onto main |
|
The kernels are now registered with the kernel contract in |
|
Thanks @jschmied for registering all five kernels and supplying the tie/head mutation receipts. The registration increment can land with our prepared integration fixes. The CUDA result still holds 16 rows while the common oracle now holds 64. We kept the CUDA layout in the adapter and its existing oracle conversion; the host control fails at 168 versus 552 bytes before that repair. All five launch records stay pending until measured on the integrated images. Production kernels are unchanged by this increment. The host checks pass, but we have not rerun the CUDA numerical, finite-bit or resource gates. Posted by Ash's AI Assistant Synthena |
The pull request's head is rebased on 1.0.12 and merges cleanly; the merged tree is the one the earlier landing of its previous head gave.
…ry family, checked against float64 The pull request's head is rebased on 1.0.12. Two registration conflicts with #734, resolved keeping both sides: core/root.zig's exports and test references (attention_ref beside tree_round) and tf-cuda-test's imports. The merged tree is the one the earlier landing of its previous head gave.
…RoPE on CUDA for every family, checked against float64 The pull request's head is rebased on 1.0.12. Registration conflicts with #734 and #746, resolved keeping both sides: the kernel list, the fatbin table, the module exports, core/root.zig's references and tf-cuda-test's imports, usage and commands. The merged tree is the one the earlier landing of its previous head gave.
…ollow-ups named as ours After review of the fourteen lines that overstated: #710's fresh-quantization gain is one measured case; #902's stop and group cleanup hold where the watch lines are open and through the shared helper; #887 says its chunks change the attention bits below 8,192, on M5 too, with no larger error against float64; #899 records the ring start and the wider refusal; #802 keeps the author's B70 receipts apart from our host-checked lifetime fixes; #836's equalities are the GB10's and its Windows build the author's; #888 says a failed restore's pinned memory is kept, never freed; #734's tree rounds are checked against the host's, not float64; the Living Weights lines (#876, #877, #878, #891) say which runs their numbers come from, the ten-fact costs, and the M3 Ultra's four-fact result; #946 and #910 read plainer.
|
Thank you, @jschmied, for verified CUDA tree rounds and the 1.0.12 rebase. We merged the reviewed head Your newer registration increment NVIDIA GB10/RTX PRO 6000 release contracts passed 55/55 with five controls red; these operator checks do not establish family adoption. Posted by Ash's AI Assistant Synthena |
|
Thanks @jschmied for #734's registration follow-up. 1.1.1 includes the five tree-round launch registrations and their numerical fixtures, with the fixture adapted to the common 64-row oracle while retaining the CUDA result layout. This increment adds contract coverage; it does not change production arithmetic. Posted by Ash's AI Assistant Synthena |
…ry family The pull request's head is rebased on 1.0.12 and merges cleanly; the merged tree is the one the earlier landing of its previous head gave.
…for every family, checked against float64 The pull request's head is rebased on 1.0.12. Two registration conflicts with ashhart#734, resolved keeping both sides: core/root.zig's exports and test references (attention_ref beside tree_round) and tf-cuda-test's imports. The merged tree is the one the earlier landing of its previous head gave.
…rm and RoPE on CUDA for every family, checked against float64 The pull request's head is rebased on 1.0.12. Registration conflicts with ashhart#734 and ashhart#746, resolved keeping both sides: the kernel list, the fatbin table, the module exports, core/root.zig's references and tf-cuda-test's imports, usage and commands. The merged tree is the one the earlier landing of its previous head gave.
… states, and a platform layer for Windows (ashhart#734, ashhart#746, ashhart#797, ashhart#798, ashhart#836, ashhart#849, ashhart#852, ashhart#853, ashhart#859, ashhart#885, ashhart#886, ashhart#888)
…ollow-ups named as ours After review of the fourteen lines that overstated: ashhart#710's fresh-quantization gain is one measured case; ashhart#902's stop and group cleanup hold where the watch lines are open and through the shared helper; ashhart#887 says its chunks change the attention bits below 8,192, on M5 too, with no larger error against float64; ashhart#899 records the ring start and the wider refusal; ashhart#802 keeps the author's B70 receipts apart from our host-checked lifetime fixes; ashhart#836's equalities are the GB10's and its Windows build the author's; ashhart#888 says a failed restore's pinned memory is kept, never freed; ashhart#734's tree rounds are checked against the host's, not float64; the Living Weights lines (ashhart#876, ashhart#877, ashhart#878, ashhart#891) say which runs their numbers come from, the ten-fact costs, and the M3 Ultra's four-fact result; ashhart#946 and ashhart#910 read plainer.
What this changes
Metal runs a drafted tree round on the GPU through
core/tree_round.zig's contract: one pick per row, each tree's verified path and emitted tokens, then the commit steps that read that result. CUDA has tree attention and the GDN tree kernel, but no verify or commit step, so every CUDA family that drafts a tree has to write its own.This adds that step as a shared module,
zig/kernels/cuda/tree_round.cuwithzig/src/cuda/tree_round.zig:tf_round_bf16_argmax: each row's first largest finite bf16 logit, at any row count and stride. A row with NaN or ±inf gets no token and the maskcore/tree_rounduses (1, 2, 4).tf_tree_round_match:oracle()for a batch of trees, one thread per tree. EachTree{first, rows, budget, eos_first, eos_count}names its rows, its budget and its EOS ids. Parents are tree-local. Results usecore/tree_round.Result's layout, sodecode()reads them unchanged.tf_round_keep_rows(each tree's kept round rows and their count),tf_round_gather_rows(those rows of any bf16 buffer, in path order, for hidden rows or drafter taps) andtf_round_keep_head(the last kept row's logits, which the next round's first pick reads). Each one ignores a tree whose result is notok.No family calls it yet. Nemotron's chain path is unchanged. The 27B in #608 and any other tree drafter can take it as it is.
core/root.zignow exportstree_roundso the CUDA test runner can check against it.Receipt
46a08c18(1.0.12) plus this commit; one DGX Spark (GB10, sm_121, driver 580.173.02, CUDA 13). No checkpoint needed.tf-cuda-test tree-round:rowArgmaxbit for bit. That covers ties, NaN, +inf, -inf and all -inf rows. Each row's padding pastvocabholds a large finite decoy that must never be picked.oracle()byte for byte, anddecode()accepts every result. The trees hit every stop (bonus, length, EOS, invalid) and every status, and include full 16-row paths, budget 0, and malformed trees and picks. 64 trees run alone equal their batched results.docs/kernel-contract.md), CUDA on GB10 (sm_121),zig build kernel-contract -Dnvcc=/usr/local/cuda/bin/nvcc, exit 0:zig/tests/cuda/contract_tree_round.zig):tf_round_bf16_argmax,tf_tree_round_match,tf_round_keep_rows,tf_round_gather_rowsandtf_round_keep_head. None of them sums anything, so each declaresaccum = none(gate 4 is N/A) and checks its own bytes: picks againstrowArgmax, results againstoracle(), and the commits against the host's kept rows, with every byte nothing writes still holding the rig's poison.okmoves nothing, and kept rows move bit for bit, NaN and infinities included. Gate 1 plants those values.registry.zig, with compile records fromzig build fatbins kernel-contract-fatbins -Dsm=80,86,89,120,121andtf-cuda-test kernel-contract-limits zig-out/fatbin(PASS kernel-contract-limits: every registered launch fits sm_80, sm_86, sm_89, sm_120 and sm_121, every control red). On the GB10 the live check readsPASS limits: 31 registered CUDA launches against sm_80/86/89/120/121, 0 problems.tf_round_bf16_argmax. Taking the head from the path's first row instead of its last fails gates 1 and 3 fortf_round_keep_head. Both were restored before the run above.zig build test(84/84 steps, 1,370 of 1,377 tests, 7 skipped; 84/84 steps again with the registration) andzig build test-cuda-host(39/39 steps), all passing.tf-cuda-test tree-roundpasses with the numbers above.tf-cuda-test samplestill matches 2,880 of 2,880.zig fmt --checkclean.lean_check.py: 517 findings, as onmain.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (No serving path changes.)SUMMARYline is in the receipt. (CUDA; no Metal kernels here.)