Skip to content

fix(cutile-rs): reject a const_grid with a zero dimension - #1520

Open
rdeaton wants to merge 1 commit into
NVIDIA:mainfrom
rdeaton:fix/const-grid-zero
Open

rdeaton wants to merge 1 commit into
NVIDIA:mainfrom
rdeaton:fix/const-grid-zero

Conversation

@rdeaton

@rdeaton rdeaton commented Oct 15, 2026

Copy link
Copy Markdown

Summary

A generated launcher compiled the kernel for whatever grid .const_grid was given, then inferred the launch grid separately. With .const_grid((0, 0, 0)) the kernel was compiled for an empty grid and then launched on the grid inferred from an exact partition binding, or failed with "Launch grid required" when there was none.

launcher_const_grid now rejects a const grid with any zero dimension before anything is compiled, on the launch path (including .compile() warmup) and in specialize(). The error is the same KernelLaunch error the other grid checks return.

Changes

Testing

  • fmt and clippy
  • run_cpu_tests.sh;
  • [x]run_gpu_tests.sh (750/750)

Checklist

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

Questions about the review? Ping us in #contributors on Discord.

A generated launcher compiled the kernel for whatever grid `.const_grid`
was given, then inferred the launch grid separately. With
`.const_grid((0, 0, 0))` the kernel was compiled for an empty grid and
then launched on the grid inferred from an exact partition binding, or
failed with "Launch grid required" when there was none. A grid with only
some dimensions zero was also compiled first.

`launcher_const_grid` now rejects a const grid with any zero dimension
before anything is compiled, on the launch path (including `.compile()`
warmup) and in `specialize()`. The error is the same `KernelLaunch` error
the other grid checks return.

Signed-off-by: Robert Deaton <me@rdeaton.space>
@rdeaton
rdeaton requested a review from elibol as a code owner October 15, 2026 19:09
@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 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.

1 participant