You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validate optimization hint values against Tile IR constraints #1409
Optimization hints are forwarded to the backend without value validation. The Tile IR spec constrains each hint, but cutile only checks that the value is an integer, so an out of range value becomes a late tileiras verifier error instead of an early cutile error with a source location.
Constraints per the Tile IR attribute definitions:
Hint
Constraint
num_cta_in_cga
power of 2 in [1, 16]
occupancy
integer in [1, 32]
num_worker_warps_per_cta
power of 2 in [1, 32]
latency (op level)
integer in [1, 10]
We should validate at both entry points: the optimization_hints macro path (SMHints setters) and the runtime CompileOptions builder. Each should reject out of range values with an error that states the valid range. The book and host-api reference should document the ranges next to each hint.
Came up in #206, where the forwarding test used values the backend verifier rejects. Version compatibility is already enforced (the 13.3 gate for num_worker_warps_per_cta); this issue is about value constraints only.
Tracks pull request NVlabs/cutile-rs#292 (NVlabs/cutile-rs#292) by @0z5a, opened 2026-09-18: fix(compiler): validate optimization hint values before backend compilation. The branch was rebased onto cutile-rs main on 2026-10-07 and merges cleanly.
@0z5a: that repository has moved here and is being archived, so the pull request is closed there, not rejected. If you want to continue the work, please recreate it against NVIDIA/cuda-rust. AGENTS.md in NVIDIA/cuda-rust has a "Transplanting a cutile-rs pull request" section that lets an agent do the replay (it fetches pull/292/head from NVlabs/cutile-rs, keeps your authorship and sign-off, and maps the moved paths).
Activity
elibol commentedon Oct 8, 2026
Tracks pull request NVlabs/cutile-rs#292 (NVlabs/cutile-rs#292) by @0z5a, opened 2026-09-18: fix(compiler): validate optimization hint values before backend compilation. The branch was rebased onto cutile-rs main on 2026-10-07 and merges cleanly.
@0z5a: that repository has moved here and is being archived, so the pull request is closed there, not rejected. If you want to continue the work, please recreate it against NVIDIA/cuda-rust.
AGENTS.mdin NVIDIA/cuda-rust has a "Transplanting a cutile-rs pull request" section that lets an agent do the replay (it fetchespull/292/headfrom NVlabs/cutile-rs, keeps your authorship and sign-off, and maps the moved paths).