Repository navigation
Conversation
d26a9ef to
deb0fa3
Compare
|
Thanks @Bizuayeu for the detailed kernel contracts. Two cases need correction before the remaining stack moves forward. In Separately,
|
Thanks. Pushed as a second commit here, On the negative pick: this stack still carries #5211's commit from before its malformed-prefix fix, so its |
20e08a2 to
42b3204
Compare
|
The heads bound has moved to where the check lives: #5443 ( |
|
Thanks, @Bizuayeu. The HCA check now rejects more than 65,535 heads before the chunk launch and sink merge, and the regression accepts 65,535 while refusing 65,536 with the reported one-row shape. That request is met. The inverse RoPE increment has no additional source-proven defect in this re-check. When the dependency stack is restacked, retain main's nonnegative-prefix window merge and its regressions. Also preserve the prepared allocation fixes from #5243, #5326 and #5535; their older versions remain in this cumulative branch. No duplicate window patch is needed here. Current-tree CUDA qualification remains pending after the integrated stack is ready.
|
915c225 to
39ecca7
Compare
…under the kernel contract ERNIE 5.5's indexer scores each query against keys made from wk's k: LayerNorm(128, eps=1e-6) with k_norm's weight and bias, then RoPE on the first 64 dims in NeoX's halves, pairs i and i + 32, at the config's rope_theta (the DSA layers' plain RoPE; YaRN is the HCA layers'). tf_ernie55_index_key (in the ernie5_5_index image) makes a key a warp: the LayerNorm in fp32, the mean then the squares about it, y = fma(xc / sqrt(var + eps), w, b), then the turn at the fp32 angle inv[i] times the position with sincosf, and one rounding to bf16 (vLLM rounds to bf16 after the LayerNorm and again after the rope). The vendor's Hadamard on q and k before its FP8 quantization is left out: with bf16 keys it changes no score in exact arithmetic. key.zig is the host's float64 key; its tests hold it to vLLM's F.layer_norm and NeoX halves. The contract (ernie5_5-index, also in kernel-contract) asks each key within its float64 bound, from prompt chunks and a decode row at the first position to decode rows past sincosf's fast range and at the 1M context's end; gate 4's rows of 254 to 260 in steps of 2 keep fp32 sums exact while fp16 and bf16 sums lose the steps. The k rows sit 192 apart with NaN past 128, so a read past the key shows. Three controls go red: GPT-J's pairs, the LayerNorm without its bias, and the next position's angle. Nothing launches it yet.
…eing and reallocating it reference freed extra and allocated it again; had that allocation failed, extra would still have held the freed slice, freed a second time by the next reference or by deinit. It is now empty between the two.
…, under the kernel contract tf_ernie55_mhc_post, in the ernie5_5_mhc image, adds a layer's bf16 output to its row's 4 residual streams as vLLM's mhc_post does for ERNIE 5.5: stream o = post[o] x + sum_i comb[i][o] res[i], with post and comb from the pre side, from the product, then the input streams in order in fma, rounded to bf16 once. GLM's post body sits in its own glue, so ERNIE's is a family kernel. The streams are checked against float64 (ernie5_5/mhc.zig), with gate 4 on integer terms that fp32 holds in any order, cancelling to +-1/2, whose fp16 and bf16 roundings do not; two controls: comb read transposed, and the layer output added without post.
…r the kernel contract tf_ernie55_hc_head, in the ernie5_5_mhc image, folds ERNIE 5.5's 4 residual streams into the one row the final RMSNorm takes, as vLLM's hc_head does: its 4 mixes against fn's float32 rows and the streams' squares, summed as the pre side sums them, the plain RMS 1 / sqrt(mean + eps) (vLLM's hc_head keeps it, where ERNIE's pre side takes 1 / (sqrt(mean) + eps)), pre = sigmoid(m r scale + base) + hc_eps, then sum_s pre_s x_s rounded to bf16 once. The row is checked against float64 (ernie5_5/mhc.zig), from the pre side's rows; gate 4 runs pre at 1/2 on one stream. Two controls: ERNIE's pre-side mix RMS, and the mixes without hc_head's scale.
… under the kernel contract tf_ernie55_mhc_pre_broadcast, in the ernie5_5_mhc image, is ERNIE 5.5's first-layer mHC pre as vLLM-ERNIE's broadcast forms it: the embedding row e as each of the 4 streams, its 24 mixes against fnb (fn's 4 column blocks summed at load, float32), the mix RMS 1 / (sqrt(mean) + eps) over e's own 4096 squares, then the pre side's pre, post, comb (Sinkhorn) and normed collapse, and e written into the 4 residual streams. The pre side's sums, its mixes' outputs and its norm become three inline functions the two kernels share; the pre side's usage is unchanged at the five SMs. Each output is checked alone against float64 (ernie5_5/mhc.zig, whose host test holds the broadcast to the pre side of e's 4 copies, bit for bit); gate 4 runs pre at 1/2 on half-integer rows. Two controls: the mix RMS's mean over pre's 4 x 4096 values, and e written into stream 0 alone.
…d RoPE, under the kernel contract tf_ernie55_hca_compress, in a new ernie5_5_hca image, forms each compressed row of ERNIE 5.5's HCA layers from its block of 128 tokens as vLLM's C128 compressor does: for each of the 512 channels, the softmax over the tokens of score + ape pooling the fp32 kv (the block's max, then expf of each difference summed and kv e accumulated in fma, the tokens in order, one division); the row's RMSNorm 1 / sqrt(mean + eps) times its weight; and GPT-J's pairs on the last 64 dims turned at the block's first position with YaRN's frequencies at compress_rope_theta; rounded to bf16 once. The rows are checked against float64 (ernie5_5/hca.zig, whose host test holds it to the vendor's two-stage pool); gate 4 sets every exponent to 0, with odd kv whose second half cancels the first. Two controls: the pool without ape, and the rope at the block's last position. hca.check also refuses strides whose furthest offsets, (128 rows - 1) ts + 1023 and (rows - 1) os + 511 floats, would pass the kernel's i64, so the launch's casts to its i64 arguments cannot trap.
…eeing and reallocating it reference freed extra and allocated it again; had that allocation failed, extra would still have held the freed slice, freed a second time by the next reference or by deinit. It is now empty between the two.
…with fp32 sinks, under the kernel contract tf_ernie55_hca_chunks, in a new ernie5_5_hca_attn image, is core's chunk tiles (common/mla.cuh's chunks_wide, the body glm_glue's tf_glm_chunks_16 runs) over 512-wide q and keys, a key row its own value: 16 heads a block, a row's keys 512 a chunk as its list gives them (the window's rows max(0, p - 127) .. p, then the compressed rows 0 .. (p + 1) / 128 - 1). The mla image's tf_mla_merge_sink then merges the chunks with each head's fp32 sink as a zero-value key: the vendor's attn_sink, a natural-log logit not multiplied by the softmax scale 512^-0.5. cuda_hca.zig's Attn launches the two. The outputs are checked against float64 (ernie5_5/hca.zig, whose host test holds it to vLLM's eager softmax over the scores and the sink, the sink's column dropped); gate 4 sets q to 0, so every weight is 1 and each output 1/16 with its sums exact. Three controls in the launch's arguments: the sinks left out, the sinks times the scale, and the compressed rows not counted.
…der the kernel contract tf_ernie55_vha, in hca.cu's ernie5_5_hca image, mixes a token's 64 attention heads at each of its dims as vLLM's VHAPostMix does at tensor parallel above 1: z = U^T o (16 sums of 64 heads), then each head's V z with its own o added last, in fp32 fmaf in that order and rounded to bf16 once. U and V are the layer's bf16 [64][16]; a launch takes rows tokens of d dims, 512 for HCA's layers and 256 for DSA's. One launch serves a rank; split across ranks, z is the sum to reduce. The outputs are checked against float64 (ernie5_5/hca.zig's vha, whose host tests hold it to the matrix form and, in exact arithmetic, to the fold I + V U^T); gate 4's column puts 2^20, 24 and -2^20 on heads 0-2 and 1/4 on the rest with U = 1 and V = 1/16, so z is 39.25 and exact in fp32 in any order, while bf16's sums lose the 24 and fp16's overflow. Two controls: the mix without o, and U and V read as [16][64].
…ilt over the runner's modules No build step compiled the test blocks of zig/tests/cuda/contract_ernie5_5_*.zig: the runner, zig/tests/cuda/main.zig, is built only as an executable, so a test there could be wrong unseen. contract_ernie5_5_test.zig imports the six that hold tests (20), and test-ernie5_5-contract-host builds it with the runner's imports, as asked in ashhart#4926; test-cuda-host depends on that step, beside contract_arch_test.zig. Building them found the HCA compressor contract's YaRN test dividing the comptime float -40.0 by hh.rope, a comptime int, which Zig 0.17 refuses. It now divides by hh.rope as f64: the same value, compared against the same bounds.
…, the sink merge's grid y attnCheck bounded the chunk tiles' grid y, (heads + 15) / 16, but mergeSink then launches with grid y = heads, so heads = 65,536 passed the check and the merge failed to launch, leaving no output. The check now bounds heads itself, which also bounds the tiles' grid; the test accepts 65,535 and refuses 65,536, and its partials case moves to 65,535 heads so that it still meets only the partials' bound.
…s turned back, under the kernel contract tf_ernie55_inv_rope, in hca.cu's ernie5_5_hca image, turns each of a token's 64 heads' rope dims 448..511 back as vLLM's inverse rope does after VHA: GPT-J's pairs at the row's position (row r at pos[0] + r) with the HCA rope's YaRN frequencies, x_e c + x_o s and x_o c - x_e s, each step rounded in fp32 and the output to bf16 once; the nope dims are copied. The angle is the fp32 product of the frequency and the position, as the compressor's, its sine and cosine sincosf's. The outputs are checked against float64 (ernie5_5/hca.zig's turnBack, whose host tests hold it to vLLM's form written apart and to the rope undone at the same position); with no sums, gate 4 does not apply. Two controls: the pairs turned forward, and each row at the next position's angle.
39ecca7 to
68a5326
Compare
…orm at two ranks tf_ernie55_vha built z = U^T o as one fp32 chain over the 64 heads, so a run split over two ranks would match it only if rank 1 went on from rank 0's z. z is now the chain over heads 0 to 31 and the chain over 32 to 63, each from 0, added once in fp32: vLLM's tensor-parallel form at world 2 (z = all_reduce(bmm(U^T, o, out_dtype=fp32))), where each rank's half goes through one all-reduce of two values, whose sum has no order. V z + o is as before. The kernel holds the two partial sums, so its records go from 56, 59, 59, 40 and 52 registers to 74, 74, 74, 64 and 64 at sm_80, 86, 89, 120 and 121, and sm_120's 8-byte spill is gone. docs/kernel-contract.md says the sum's form.
|
Thanks. Pushed: this branch's head is now On the GB10, beside
The host steps pass on the GB10, Windows and WSL. The numbers are in the body's first Checks item. #5538 has carried the same change since |
|
Agreed. #5538's head |
|
Thank you, @Bizuayeu. We compared this branch with #5538 file by file. Everything here is in #5538 unchanged or extended, and #5538 also has the three host fixes and #5443's bounds that this branch doesn't. So, as you suggested, the plan is to land #5538 and close this one as included. Nothing more is needed from you here, and thank you for keeping the two in step.
|
What this changes
tf_ernie55_inv_rope, in #5326'sernie5_5_hcaimage (hca.cu, so no new image and no change to thekernels.zigpin): ERNIE 5.5's inverse rope on the HCA attention output. vLLM'sfused_inv_rope_fp8_quant(withquantize=Falsewhenwo_ais bf16) turns each head's rope dims 448..511 back after VHA, by the query's position: GPT-J's pairs,x_e cos + x_o sinandx_o cos - x_e sin, from the HCA rope's fp32 table, computed in fp32 from the bf16 input and stored as bf16; the nope dims pass. A launch takes rows tokens of 64 heads, bf16 [rows][64][512], row r atpos[0] + r, and writes a separate output. Nothing launches it yet, so served output is unchanged.One 256-thread block a token; thread t holds dims 2t and 2t + 1 of each of the 64 heads, so threads 224..255 hold the 32 rope pairs. Pair l = t - 224 turns by the angle
freq[l] * pos, the fp32 product of the HCA rope's YaRN frequency (theta 160,000, factor 16 over 65,536 positions,core.rope_yarn.yarn) and the position, its sine and cosinesincosf's, once a thread for its 64 heads (the compressor's angle and its out-of-linesincosf, #5326). Each product and the sum round in fp32 (__fmul_rn, then__fadd_rnor__fsub_rn), then bf16 once. vLLM's Triton kernel leaves fusion on, so it may contractx cos ± x' sininto an fma; the bound below covers either.zig/src/families/ernie5_5/hca.zigholds the host's float64 inverse rope (turnBack, at the sameangleas the compressor's rope) andinvCheck(more rows than the grid's i32 refused).hca_test.zigholdsturnBackto vLLM's form written apart from it at positions 0, 127, 4,000, 199,999 and 1M - 1; to the identity at position 0 and to the rope undone at the same position (turnthenturnBack); andinvCheck's refusal.cuda_hca.zig'sHcaloadstf_ernie55_inv_ropewith the image's other entries and launches it (invRope,invRopeWith): a token a 256-thread block.zig/tests/cuda/contract_ernie5_5_inv_rope.zig,tf-cuda-test ernie5_5-inv-rope, also inkernel-contract) checks every output (bf16) against float64. With no sums,.accum = .noneand gate 4 does not apply. The bound adds, beyond the output's bf16 rounding,sincosf's 2 ulps and the steps' roundings as 8 units (2^-24) of each output's terms,|x_e| |cos| + |x_o| |sin|. The shapes: 4 rows from position 126 (the window filling), 1 at position 0, 64 from 4,000 (a prompt chunk), 1 at 199,999 (pastsincosf's fast range) and 2 ending at the 1M context's last position, with x drawn from [-2, 2) as bf16; gate 1 plants NaN in a nope dim, inf in a rope dim and -inf in the last. Two planted controls, in the kernel's body: the pairs turned forward (the q's rope again), and each row at the next position's angle.contract_ernie5_5_test.zig), sotest-cuda-hostruns them.ernie5_5_records.zig), the runner's module,docs/kernel-contract.mdand the usage line.Searched first: no open pull request or issue covers this (searched "inverse rope" and "inv_rope"). On main, DeepSeek V4.1 folds its inverse rope into its attention merge, before the fp32 output is rounded; ERNIE's VHA rounds to bf16 in between (#5508), so that form does not carry over.
7bd2c5bd9d: VHA, the contract-test root andattnCheck's bound on heads, which your review here asked for, cuda ernie5_5: the inverse rope on the attention output, GPT-J's pairs turned back, under the kernel contract #5536 (comment); it is cuda ernie5_5: the HCA attention, a row's window and compressed keys with fp32 sinks, under the kernel contract #5443's commit, since cuda ernie5_5: the HCA attention, a row's window and compressed keys with fp32 sinks, under the kernel contract #5443 adds the check), on cuda ernie5_5: the HCA attention, a row's window and compressed keys with fp32 sinks, under the kernel contract #5443, cuda ernie5_5: the HCA compressor, a block's softmax pool, RMSNorm and RoPE, under the kernel contract #5326, cuda ernie5_5: the mHC broadcast, the first layer's pre from one row, under the kernel contract #5324, cuda ernie5_5: hc_head, the last layer's 4 streams into one row, under the kernel contract #5318, cuda ernie5_5: the mHC post side, a layer's output into its 4 streams, under the kernel contract #5311, cuda ernie5_5: the mHC pre side, a row's mixes, Sinkhorn and the collapse's RMSNorm, under the kernel contract #5301 and cuda ernie5_5: the DSA indexer's keys, k's LayerNorm then NeoX RoPE, under the kernel contract #5243 on main469f1f7fd8(cuda ernie5_5: the DSA key lists, top-k picks then the window, under the kernel contract #5211 and cuda ernie5_5: the mHC pre side, a row's mixes, Sinkhorn and the collapse's RMSNorm, under the kernel contract #5301 are on main now), each at its head before your restack of them; this pull request's own commit is the twelfth on the branch: 12 files changed, 354 insertions(+), 4 deletions(-). The stack carries cuda ernie5_5: the DSA key lists, top-k picks then the window, under the kernel contract #5211's commit from before its malformed-prefix fix, so itswindow.zigandindex.cuare the old ones; once they land, it rebases onto main and takes main's, with their regressions.atc overlap --json: atc 0.9.4 withATC_READ_ONLY=1and cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's head then (9466965593) as the base (so this commit alone), run in this tree on 2026-11-28 at 16:48 UTC ond26a9ef17f(this commit but for the number, before the restack):complete: false(otherPullRequestsLimit,pullFilesUnavailable,pullRequestsLimit,timeLimit), 6 pull requests in its working tree's rows, 4conflictsand 2clean.conflict_delta: each open pull request merged bygit merge-treewith cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's head then (9466965593) and withd26a9ef17f, conflicting files and hunks compared: over the 379 open on 2026-11-28 at 16:43 UTC, it adds a conflict to none.Checks on this head
55fa125d32cuda ernie5_5: VHA's z as its two 32-head halves added once, vLLM's form at two ranks, on your restack68a53268b1(15 commits on main0546beeee8), as agreed on ERNIE-5.5-Flash-Preview on two DGX Sparks: a native CUDA family #4926 (ERNIE-5.5-Flash-Preview on two DGX Sparks: a native CUDA family #4926 (comment)): cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's5b63cc0ee1picked, itshca.cuanddocs/kernel-contract.mdhunks the same patch, the records line givingtf_ernie55_vhathe same registers, and no CHANGELOG line, since the restack carries none for VHA; cuda ernie5_5: the output gate, z times bf16(sigmoid(g)) at torch's roundings, under the kernel contract #5538 (fb59c9db2c) has the same change. On the GB10 (sm_121),55fa125d32and68a53268b1each checked out with an empty global cache,zig build compile-cuda-tests fatbins kernel-contract-fatbins -Dnvcc=... -Dsm=80,86,89,120,121: 0 errors on both.tf-cuda-test kernel-contract-limits zig-out/fatbingives the fivetf_ernie55_vhalinesPASS ... (record current), 74 registers at sm_80, 86 and 89 and 64 at sm_120 and 121 (8,192 static shared bytes, bound 256; 56, 59, 59, 40 and 52 on68a53268b1), and its other lines are68a53268b1's.tf-cuda-test ernie5_5-vhapasses gates 1-4 with68a53268b1's numbers, run beside it: gate 1, 192 non-finite and 163,648 finite outputs in their float64 classes; gate 2, five runs byte-identical; gate 3, 8 shapes within the float64 bound, the worst at 0.990 of it; gate 4, exact sums at k 64; its two controls red as planted at 940.80 and 33.46.tf-cuda-test kernel-contract ernie5_5: 16 kernels pass gates 1-4, 24 controls red as planted, 0 limit problems. Against68a53268b1's fatbins, 208 of 212 are byte-identical; inernie5_5_hcaonlytf_ernie55_vhaand its two controls change, at each SM (cuobjdump -sass, addresses dropped), andernie5_5_index,glm_glueandglm_indexdiffer in bytes with no SASS function changed.hca.cu's PTX: 33 compiles at each of compute_80, 86, 120 and 121 with address randomization on and off, one form at each.zig build -Dfixed-cpu test-ernie5_5-host53 of 55, 2 skipped;test-kernel-contract49 of 49 steps, 381 of 381 tests;test-gradient-serving1 of 1;test-ernie5_5-contract-host23 of 23;test-cuda-host576 of 576 steps, 11,008 of 11,058 tests, 50 skipped. Windows:tools/pr_check.py --pr 5536against68a53268b1, 0 errors, lean 92 against 92, 0 new, import cycle edges 25 against 25, cross-family edges 11 against 11 (1 allowed);zig fmt --checkandzig ast-checkon the records file;git diff --checkclean;compile-cuda-tests12 of 12 steps,test-ernie5_5-host53 of 55, 2 skipped,test-ernie5_5-contract-host23 of 23,test-kernel-contract49 of 49 steps, 381 of 381 tests. WSL 2 (x86-64), a fresh clone:git diff --checkclean, the same host steps with the same counts andcompile-cuda-tests12 of 12,test-cuda-host576 of 576 steps, 10,723 of 10,771 tests, 48 skipped,tools/zig/check_cuda_sources.pyonhca.cuwith clang++ 6 of 6,host_tests_testOK, CI's pytest from the root (-q -rs) 966 passed, 121 skipped, 869 subtests passed, the same skips as on68a53268b1.conflict_deltaagainst68a53268b1over the 363 open pull requests on 2026-11-30 at 02:45 UTC: it changes the conflicting hunks of two, cuda ernie5_5: the output gate, z times bf16(sigmoid(g)) at torch's roundings, under the kernel contract #5538 (21 to 19; it has the same change) and cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508 (41 to 39; it has the change), with no new files.42b3204f22cuda ernie5_5: the inverse rope on the attention output, GPT-J's pairs turned back, under the kernel contract:deb0fa3a51restacked on cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's7bd2c5bd9d(git range-diffequal), its tree the same as20e08a2e4b's, where the heads bound sat on this branch before it moved to cuda ernie5_5: the HCA attention, a row's window and compressed keys with fp32 sinks, under the kernel contract #5443 and cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508. No shape the receipts below run reaches that bound (the HCA attention's contract runs 64 and 32 heads).deb0fa3a51differs from9cc1e164cf, where the GB10 steps below ran, in its base (cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's head now, with the contract-test root), its line in that root, the contract'sextraemptied between freeing and reallocating it, and this pull request's number in its CHANGELOG line;hca.cuand the kernel's launch are the same.1f3bd0507f(this commit on cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's first commit, without the root line and the number), built on the GB10 the same way, against9cc1e164cf's fatbins: 196 of 200 byte-identical, and the four whose bytes differ (ernie5_5_hca,ernie5_5_index,glm_glue,glm_index) have no SASS function changed; so the receipts below stood for it; your restack68a53268b1and this head have their GB10, Windows and WSL steps in the line above.tools/pr_check.py --base 7bd2c5bd9d --pr 5536,42b3204f22against cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's): 123 problems on both, 0 new; import cycle edges 24 against 24, 0 new; cross-family edges 11 against 11 (1 allowed); 0 errors.9cc1e164cfchecked out with an empty global cache beside its parent7f02aa063bbuilt the same way,zig build compile-cuda-tests fatbins kernel-contract-fatbins -Dnvcc=... -Dsm=80,86,89,120,121: 0 errors on both. On the GPU,tf-cuda-test kernel-contract-limits zig-out/fatbingives the fivetf_ernie55_inv_ropelinesPASS ... (record current)(32 registers at sm_80, 34 at the others, no static shared memory, bound 256), and its other lines are the parent's;tf-cuda-test ernie5_5-inv-ropepasses gates 1-3: gate 1, 5 non-finite and 163,835 finite outputs in their float64 classes; gate 2, five runs byte-identical; gate 3, 5 shapes within the float64 bound, the worst at 0.996 of it; gate 4 n/a (no sums); its two controls red as planted (below).tf-cuda-test kernel-contract ernie5_5: 16 kernels pass gates 1-4, 24 controls red as planted.hca.cu's PTX: 33 compiles at each of compute_80, 86, 120 and 121 with address randomization on and off, one form at each.zig build -Dfixed-cpu test-ernie5_5-host51 of 53, 2 skipped;test-kernel-contract46 of 46 steps, 353 of 353 tests;test-gradient-serving1 of 1;test-cuda-host512 of 512 steps, 9,862 of 9,907 tests, 45 skipped; the contract file's tests, from a temporary root over the runner's modules, 3 of 3.20e08a2e4b, the tree before your restacks:zig build -Dfixed-cpu test-ernie5_5-host --summary all3 of 3 steps, 51 of 53 tests passed, 0 failed, 2 skipped, on Windows and in a fresh WSL 2 clone;compile-cuda-tests12 of 12 steps on both.d26a9ef17f(deb0fa3a51but for this pull request's number in its CHANGELOG line):zig build -Dfixed-cpu test-ernie5_5-contract-host --summary all7 of 7 steps, 23 of 23 tests passed, 0 failed, 0 skipped (cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's 21 and this file's 2);zig fmt --checkandzig ast-checkon the changed Zig files; on9cc1e164cf,compile-cuda-tests12 of 12 steps andtest-kernel-contract46 of 46 steps, 353 of 353 tests.d26a9ef17f, in a fresh clone of the stack:git diff --checkclean;zig build -Dfixed-cpu compile-cuda-tests12 of 12 steps;test-ernie5_5-host51 of 53, 2 skipped;test-cuda-host, which runs the contract-test root, 518 of 518 steps, 9,885 of 9,930 tests passed, 45 skipped (2 more than cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's head, this contract file's 2);tools/zig/check_cuda_sources.pyonhca.cuwith clang++ 6 of 6;host_tests_testOK. CI's pytest from the root (-q -rs), in cuda ernie5_5: the output gate, z times bf16(sigmoid(g)) at torch's roundings, under the kernel contract #5538's clone (244bedcd96, the output gate ond26a9ef17f): 861 passed, 116 skipped, 827 subtests passed, the same skips as main469f1f7fd8's.Receipt
tf_ernie55_inv_rope, so no served token or byte can change. On the GB10, against its parent built the same way,ernie5_5_hcagainstf_ernie55_inv_ropeand its two controls at each SM with no existing function changed (cuobjdump -sass, addresses dropped), and of the other 199 fatbins 196 are byte-identical and three differ in bytes with no SASS function changed (ernie5_5_index,glm_glueandglm_index, which differ the same way between two builds of the same sources).55fa125d32(this head, its line above, against your restack68a53268b1on main0546beeee8),42b3204f22(the head before your restacks),20e08a2e4b(its tree: the host tests above),deb0fa3a51(this commit on cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508's9466965593),d26a9ef17f(deb0fa3a51but for its CHANGELOG number: Windows, WSL),1f3bd0507f(the GB10's fatbins against the gate's) and9cc1e164cf(the GB10's gates and host steps, Windows' build), on cuda ernie5_5: VHA, the attention output's head mix o + V (U^T o), under the kernel contract #5508 on main469f1f7fd8; Zig 0.17.0, nvcc 13.0.88; one GB10 (sm_121); no checkpoint (synthetic rows; the rope dims and frequencies from the released config).tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false: n/a (no served path).tools/bench_openai.py: n/a (no served path).Kernel contract, only when a GPU kernel is new or changed
tf_ernie55_inv_rope(new; replaces none), records for sm_80, 86, 89, 120 and 121 inzig/src/core/contract/ernie5_5_records.zig(32 registers at sm_80, 34 at sm_86, 89, 120 and 121, no static shared memory, bound 256, all current).SUMMARYline and exit status:SUMMARY ernie5_5 inv_rope: 1 kernels, 1 pass gates 1-4, 0 fail, 0 known findings; 2 controls: 2 red as planted, 0 missed, exit 0;kernel-contract ernie5_5:(filtered) SUMMARY 16 kernels: 16 pass gates 1-4, 0 fail, 0 known findings; 24 controls: 24 red as planted, 0 missed; 0 limit problems, exit 0. CUDA only (no HIP, Metal or XPU image).Checklist
-Dnvccthe CUDA steps are not built, as for every image)."draft": false, a resumed prompt equals a fresh one, and concurrent equals solo (no served path changes).--drafter, no slower than without it, greedy and sampled (no served path changes).