Repository navigation
fix(docs): an example README names warp::shfl, which has never existed - #1068
Merged
nihalpasham merged 2 commits intoAug 20, 2026
Merged
Conversation
`hashmap_v3/README.md` contrasts v3's typed cooperative-groups API against
what v2 did:
- **Raw `warp::ballot` / `warp::shfl` find kernel.** v3 uses only the
typed cooperative-groups API; ...
`cuda-device` exports 32 `shuffle*` functions from `warp` and no `shfl` at
all. `shfl` is the cooperative-groups *method* name, which is what v3 itself
calls (`.shfl(`, twice) -- so the sentence describes the raw path using the
typed path's vocabulary. v2's source settles the right name: it calls
`warp::shuffle` five times, alongside `warp::ballot` six times and
`warp::lane_id` twice.
Nothing would have caught it. `check-book-api-names.sh` exists precisely
because a name the tree does not have "renders, it builds, and a reader finds
out by pasting it" -- but it looked only at `cuda-oxide-book`. Crate and
example READMEs carry 122 qualified device names, are the first thing a reader
of an example opens, and rot the same way. Extend the guard's file scope to
them, minus the vendored `rustlantis` subtree, whose files keep their upstream
form and document another project's API.
Extending it exposed a second limitation immediately. The family shorthand
expander was end-anchored (`^(.*)_\{...\}$`), so
`warp::reduce_{sum,max,min}_f32` -- real notation in `warp_reduce/README.md` --
parsed as the family `reduce_{sum,max,min}` with the `_f32` dropped, and the
guard reported three functions missing that were never named. The pattern now
allows the group anywhere in the name, so `foo_{a,b}_bar` expands to
`foo_a_bar` and `foo_b_bar` while `threadIdx_{x,y,z}` keeps working.
Verified:
- The guard passes on this tree: 42 device-API calls in 465 Rust blocks across
the book and 159 READMEs, and 38 qualified prose names, all resolving
against cuda-device's 1190 exported functions -- up from 34 calls in 277
blocks and 31 names.
- Putting `warp::shfl` back fails it, naming the file.
- Planting `warp::ballot_nonexistent` in a README fails it, naming the file.
- Before the expander change the guard reported `warp::reduce_sum`,
`warp::reduce_max` and `warp::reduce_min` missing; after it, none.
- Both new self-tests fire on an empty result: fewer than 20 book pages or
fewer than 50 READMEs stops the run rather than reporting a clean tree.
Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
nihalpasham
approved these changes
Aug 20, 2026
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.
hashmap_v3/README.mdcontrasts v3's typed cooperative-groups API against what v2 did:cuda-deviceexports 32shuffle*functions fromwarpand noshflat all.shflis the cooperative-groups method name, which is what v3 itself calls (.shfl(, twice) — so the sentence describes the raw path using the typed path's vocabulary. v2's source settles the right name: it callswarp::shufflefive times, alongsidewarp::ballotsix times andwarp::lane_idtwice.Nothing would have caught it
check-book-api-names.shexists precisely because a name the tree does not have "renders, it builds, and a reader finds out by pasting it" — but it looked only atcuda-oxide-book. Crate and example READMEs carry 122 qualified device names, are the first thing a reader of an example opens, and rot the same way. This extends the guard's file scope to them, minus the vendoredrustlantissubtree, whose files keep their upstream form and document another project's API.Extending it exposed a second limitation
The family-shorthand expander was end-anchored (
^(.*)_\{...\}$), sowarp::reduce_{sum,max,min}_f32— real notation inwarp_reduce/README.md— parsed as the familyreduce_{sum,max,min}with the_f32dropped, and the guard reported three functions missing that were never named. The pattern now allows the group anywhere in the name, sofoo_{a,b}_barexpands tofoo_a_barandfoo_b_barwhilethreadIdx_{x,y,z}keeps working.Verification
warp::shflback fails it, naming the file.warp::ballot_nonexistentin a README fails it, naming the file.warp::reduce_sum,warp::reduce_maxandwarp::reduce_minmissing; after it, none.The script keeps its name and its
status-guard.ymlwiring; only its scope and its two messages change.