Repository navigation
flint metal: a shared round's sampled rows draw in one launch - #4780
Merged
Merged
Conversation
1 task done
ashhart
force-pushed
the
lead/flint-sampled-batch
branch
from
November 23, 2026 20:48
06149ba to
83f95b2
Compare
…p a row (#3396) Flint's encoder is serial, and each drawn row of a shared round was its own one-threadgroup launch, so a round's sampled rows ran one after another on one GPU core each. The keyed samplers (tf_gpu_sample and tf_sample_full) already index the logits, settings and token slot by threadgroup, as Nemotron launches them, so consecutive sampled rows writing consecutive slots now share one launch. Each threadgroup reads only its own row and writes only its own slot, so every row's token is the one its launch alone draws. Greedy rows and the lone step are unchanged; a one-row launch binds the same bytes as before. gpu_rule.Launch packs the per-row settings. test-lanes-sampler-launch-host checks that a one-row launch binds byte for byte what Flint's pick bound on main, and that a launch of 1 to 32 rows binds each row's settings at its own index, zeros past the last row.
ashhart
force-pushed
the
lead/flint-sampled-batch
branch
from
November 24, 2026 01:06
83f95b2 to
39fc23b
Compare
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.
Refs #3396.
Flint drew each sampled row of a shared round with its own serial launch on one GPU core. Consecutive sampled rows that write consecutive token slots now draw in one launch, one threadgroup a row, so they run side by side.
Each threadgroup reads only its own logits row, settings, seed and position, and writes only its own slot, so every token is what that row's own launch would draw. Greedy rows, one-row launches and the lone pipelined step bind the same bytes as main.
Host checks:
test-lanes-sampler-launch-hostcompares the one-row bindings with main's byte for byte and checks grouped rows at 1 to 32 rows, with a planted control that fails.zig fmt, AST and lean are clean.Not yet proven: this has not run on a Mac with Flint. Token equality and speed on an M5 Max are the open check before landing.