Commit 45e543d
[multi-gpu] Phase 1: fix negative-rank verifier check
The previous commit (888bcaa) added a `>= 0` verifier on src_rank /
dst_rank, but used `getSrcRank()` / `getDstRank()` — those return
`std::optional<uint64_t>` (a TableGen quirk for `OptionalAttr<I64Attr>`),
so `*sr < 0` on the unsigned value is always false and the check never
fired. The two new verifier-negative tests in air_memcpy_invalid.mlir
silently regressed.
Switch to the typed `getSrcRankAttr()` / `getDstRankAttr()` accessors
which return `IntegerAttr`, then call `.getInt()` for a real `int64_t`.
The check now fires on negative values; both negative-rank tests pass
under `lit -sv ../../mlir/test/Dialect/AIR` (21/21).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 44d743d commit 45e543d
1 file changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2823 | 2823 | | |
2824 | 2824 | | |
2825 | 2825 | | |
2826 | | - | |
2827 | | - | |
2828 | | - | |
2829 | | - | |
2830 | | - | |
2831 | | - | |
2832 | | - | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
2833 | 2840 | | |
2834 | 2841 | | |
2835 | 2842 | | |
| |||
0 commit comments