Skip to content

fix: reject oversized cuTile partition dimensions - #1383

Closed
Rachit2323 wants to merge 1 commit into
NVIDIA:mainfrom
Rachit2323:fix/cutile-shape-i32-overflow
Closed

Rachit2323 wants to merge 1 commit into
NVIDIA:mainfrom
Rachit2323:fix/cutile-shape-i32-overflow

Conversation

@Rachit2323

Copy link
Copy Markdown

Summary

  • reject partition dimensions that do not fit the compiler and kernel i32 ABI
  • propagate checked partition/map metadata conversion failures through normal launches and specialization-only warmup
  • keep checked conversions at final kernel argument construction as defense in depth
  • add driver-free boundary regressions for regular and mapped partitions

Fixes #1382.

Why

Partition and map dimensions enter the host API as usize, but the compiler metadata and kernel ABI use i32. The previous grid check allowed the full u32 range, while later as i32 casts changed values above i32::MAX into negative dimensions.

Testing

  • cargo fmt -p cutile -p cutile-macro -- --check
  • git diff --check
  • cargo test -p cutile --lib partition_metadata_rejects_dimensions_above_i32_max could not run locally because this checkout has no CUDA 13+ toolkit; the build stopped in cuda-bindings/build.rs before compiling the changed crates

Signed-off-by: Rachit2323 <atreyrachit23@gmail.com>
@Rachit2323
Rachit2323 requested a review from elibol as a code owner October 3, 2026 17:47
@copy-pr-bot

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

@Rachit2323 Rachit2323 closed this Oct 3, 2026
@Rachit2323
Rachit2323 deleted the fix/cutile-shape-i32-overflow branch October 3, 2026 17:50
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]: cuTile partition dimensions above i32::MAX wrap into negative kernel metadata

1 participant