Skip to content

docs(cutile-rs): make the PointerTile examples in the DSL reference type-check - #1599

Open
ImanolGo wants to merge 1 commit into
NVIDIA:mainfrom
ImanolGo:docs/pointer-tile-snippets
Open

ImanolGo wants to merge 1 commit into
NVIDIA:mainfrom
ImanolGo:docs/pointer-tile-snippets

Conversation

@ImanolGo

Copy link
Copy Markdown

Summary

The PointerTile examples in cutile-book/reference/dsl-api.md broadcast a scalar (rank-0) pointer tile straight to { [128] }. PointerTile::broadcast keeps the rank, so rustc rejects them (E0308: expected Shape_0, found Shape_1<'_, 128>). This reshapes to rank 1 first with reshape_ptr, then broadcast_ptr, then offset_tile, as separate annotated lets. Fixes #1597.

Changes

  • Two examples in cutile-book/reference/dsl-api.md: the PointerTile type section and the pointer-load example under "Pointer-based loads and stores". Documentation only; no code changes.

Testing

Documentation-only change. The corrected form (same steps, same types) compiles with the compile-only API (KernelCompiler, target sm_89, no GPU needed): kernel docs_fixed in https://github.com/ImanolGo/murmuration-kernels/tree/0b219ab8b3fcdb8392f653a1180ace3d433f3952/upstream-repros/cutile-dsl-friction . The original snippet fails rustc in the same crate with cargo build --features docs-snippet.

Not run: just -f cuda-oxide/Justfile check and cutile-rs/scripts/run_all.sh. The author has no sm_80+ GPU on this machine, and the change touches only Markdown.

  • just -f cuda-oxide/Justfile check passes (not applicable to a Markdown-only change; not run)
  • cargo oxide run <example> passes (not applicable)
  • New example added (not applicable)

Checklist

  • All commits signed off (git commit -s)
  • SPDX headers on new source files (no new source files)

AI contribution: drafted and checked with Claude Code (Anthropic); submitted by me.

…ype-check

PointerTile::broadcast keeps the rank, so broadcasting a scalar pointer tile
(rank 0) straight to { [128] } does not compile. Reshape to rank 1 first with
reshape_ptr, then broadcast_ptr, then offset_tile, as separate annotated lets.

Fixes NVIDIA#1597

Signed-off-by: Imanol Gomez <[email protected]>
@ImanolGo
ImanolGo requested a review from elibol as a code owner October 21, 2026 12:59
@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: The PointerTile examples in cutile-book dsl-api.md do not type-check

1 participant