Repository navigation
cuda: tree attention and head dim 512's window rows read keys from a page table (_pg kernels), SASS of the others unchanged - #1618
Merged
Conversation
…els), SASS of the others unchanged
…_pg kernels), SASS of the others unchanged part_staged takes the pages as an empty template pack: tf_wrows_part_512 and tf_wrows_merge_512 keep their code, and window_pages.cu adds tf_wrows_part_512_pg (a key's page from the table at any tok, a staged tile may cross pages) and tf_wrows_merge_512_pg (merge<512>'s existing PG replay). loadPages loads them into wide_fns[1].paged; 512 has no paged prompt, so Paged.prompt is optional and promptRows refuses one. The records copy the base kernels' (regs TODO). window-pages-512: the 12B, 31B and a GQA 5 shape decoded over shuffled pages of 16, 37 and 256 positions (NaN in every unused slot) give the contiguous bits, the merge's float64 replay included.
…le (_pg twins), SASS of the others unchanged window_pages.cu instantiates prompt::kernel<512, P32, NONE, true> as tf_wrows_prompt_512_pg and tf_wrows_prompt_512_p32_pg; window_rows.cuh is unchanged (its bool PG path already serves 256's paged prompt). A 32-key tile takes one page base, so promptWith refuses pages whose tok is not a multiple of 32 (prompt_tile). Paged.prompt is now [bf16 P, P32] like Wide.prompt; 256 keeps bf16 P only. The records copy the base kernels' (regs TODO). window-pages-512 adds prompt rows: the 12B and 31B shapes, chunks over many pages starting mid-page and at a page start, P as bf16 and P32, pages of 32, 64 and 256 (NaN in every unused slot), bit-equal to the contiguous cache with the float64 replay included, and pages of 48 refused.
…d decode and prompt rows, with controls
ashhart
force-pushed
the
paged-shared-kernels
branch
from
October 29, 2026 23:45
ecee1cc to
69ae32c
Compare
Owner
|
Thank you @jschmied. This is in TensorFold 1.2.0, released today: https://github.com/ashhart/TensorFold/releases/tag/v1.2.0 It landed with your commits under your own name, so you're listed as a TensorFold contributor, and it's credited to you in the release notes and the changelog. |
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.
Shared attention kernels read committed keys from a page table, so a family can keep its full-attention caches in pages of the core KV pool (#781). Gemma 4 and Kolibri-1 use them in the two PRs stacked on this one.
_pgtwins oftf_tree_shared*andtf_tree_part*(dims 128 and 256, all block shapes; 12 kernels).Rows.pages: ?Pages = nullpicks them, null keeps today's launches.Pgmoved tocommon/kv_pages.cuh.tf_wrows_part_512_pg+tf_wrows_merge_512_pg(decode) andtf_wrows_prompt_512_pg/_p32_pg(prompt rows, pages a multiple of 32).if constexpr. Even an unusedPgargument changed nvcc's SASS of the existing kernels.Checks (GB10, nvcc 13.0, on main d33dcfc)
tools/zig/cuda_sass_identity.py, main..head, sm_80/86/89/120/121): 430 functions over 4 images, 0 changed, 80 added (60 tree_attention, 20 window_pages), 0 unstable.tree_testsover shuffled pages of 16, 37 and 256 positions (dims 128/256, one-warp and 3-stage blocks);window-pagesdecode over pages of 16/37/256 and prompt rows over 32/64/256, NaN in every unused slot.tf-cuda-test kernel-contractstops atunknown image name: fp8_expertson main too, after the same 220 non-control FAILs (Qwen4 GDN/PLE/HC, weight-only, qwen35 NaN rows), identical by name on main and on this stack. 2088 PASS.cuobjdump -res-usageon the 5 SMs.kernel-contract-limits zig-out/fatbin(-Dsm=80,86,89,120,121): every record this stack adds is current. Its 205 stale records are all in qwen35*, qwen4_*, nvfp4_experts_tile and act_rows.zig build test test-kernel-contract test-golden test-server-security test-pull-security fuzz-cortheon,git diff --check: pass; lean 0 new.