Repository navigation
Conversation
…block and an up half a column a thread tf_ink2_loop_gate ran one block a gate row: one block read the 590 KB down matrix and the 590 KB forget/gain pair for each of the 96 gates a token. tf_ink2_loop_gate_down runs a block a row and rank pair, each with the one-block kernel's norms, 256-thread chains and reduction tree, and writes the BF16 zeta to a [rows][64] scratch; tf_ink2_loop_gate_up runs a thread a column with the same ascending rank chains, tanh and four rounding steps. tf_ink2_loop_gate stays in the image, unserved, as the contract's baseline: the halves are gated bit-equal to it.
…20 too nvcc 13.0 -cubin -O3 --resource-usage per SM, as the image builds them: tf_ink2_loop_gate_down 22/24/24/32 registers, tf_ink2_loop_gate_up 38/70/46/46, static shared bytes and launch bounds as on sm_121, no stack or spills. The two launches admit sm_80 onward, so the registry check now has their numbers on every pinned SM.
…ged in whole 128-byte reads tf_ink2_loop_project_qkv tiles 16 rows by 16 outputs, so a one-row decode left 15 of 16 threads idle and re-read its weights in 32-column slices. For up to 16 rows, tf_ink2_loop_qkv_rows1/4/16 run a warp per 32 output columns: the warp stages its 32 weight rows 64 columns at a time with whole-row 128-byte reads and the rows' inputs, and each thread runs its output's rows over the same ascending FP32 chain, so the BF16 results are tf_ink2_loop_project_qkv's. Prompt chunks keep tf_ink2_loop_project_qkv.
…places, its usage on every SM projectQkvTiles keeps tf_ink2_loop_project_qkv's 16x16-tile launch callable at any row count (prompts take it as before); the contract's ProjectQkv now names it in replaces, so gate 3 compares the decode kernels' q, k and v bytes with the tiles' on the same inputs at every served shape. The control told one row fewer stays red against the tiles. tf_ink2_loop_qkv_rows1/4/16 compiled with nvcc 13.0 -cubin -O3 per SM: 128/128/90 registers on sm_80, 128/128/88 on sm_86 and sm_89, 86/90/103 on sm_120 as on sm_121; static shared bytes and the 32-thread bound as on sm_121, no stack or spills.
Owner
Author
|
Stopped at #4718. |
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.
CI for a landing train: #4718 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.