Commit 0e9e3a8
[Path B] allocateLockOp: scope ID reservation to same-col LTOs
The cross-LTO lock-ID reservation logic added during Path B was too
aggressive: any LogicalTileOp would walk locks from EVERY LTO of the
same tile_type and union their IDs, even LTOs at different col hints
that aie-place-tiles will resolve to physically-distinct tiles.
For bf16_cascade (8 memtile cols × 10 locks each), this assigned IDs
0..79 across the 8 memtile LTOs instead of 0..9 per tile. NPU2
memtiles cap at lockID=63, so air-to-aie's verifier rejected the IR:
'aie.lock' op lock assigned invalid id (maximum is 63)
The reservation only matters when LTOs MIGHT collapse to the same
physical tile post-place. LTOs with different col hints are guaranteed
to land on different cols (and therefore different physical tiles), so
their lock IDs cannot collide. Restrict the reservation walk to LTOs
sharing the same (col, tile_type) — same-col same-type LTOs are the
only ones aie-place-tiles can fold together.
Verified locally:
- check-air-mlir: 383/392 pass (same as before, no regressions)
- matrix_vector_multiplication/bf16_cascade: compiles cleanly
through air-to-aie + aie-place-tiles + downstream pipelines
- matrix_scalar_add, dual_herd_packet_switch, 33_triton: still
compile cleanly
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0e03a23 commit 0e9e3a8
1 file changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
99 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
| |||
0 commit comments