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.
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:
num_cta_in_cgaoccupancynum_worker_warps_per_ctalatency(op level)We should validate at both entry points: the
optimization_hintsmacro path (SMHintssetters) and the runtimeCompileOptionsbuilder. 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.