Commit 1f2fd9a
[AIEPlacer] Unify objectfifo + flow placement through Adjacency
Replaces the parallel `ConnectivityGroup` / DFS-grouping path with the
same `Adjacency` representation already used by buffer / lock / cascade
constraints (#3041, #3042, #3046, prior commit on this branch).
## Motivation
Before this commit, the placer maintained two independent
"tile-to-tile relation" representations:
1. `Adjacency` -- introduced for buffer/cascade/lock affinity. Pairwise
edges + indexed lookup. Used for legality predicates.
2. `ConnectivityGroup` + bespoke `MapVector<LT, SetVector<LT>>` adjacency
+ manual DFS in `buildFlowGroups`. Used for centroid placement of
mem/shim tiles near their core peers.
These do the same job (encode "what tiles are related") in different
shapes. With #3046 landed there's now exactly one canonical
representation; the legacy fifo path is the only thing left using the
parallel one.
## What changes
- New `buildObjectFifoAdjacency(objectFifos, objectFifoLinks) -> Adjacency`:
emits one edge per `(producer, consumer_i)` pair. Linked fifos share
an intermediate tile (link tile == consumer of every source fifo and
producer of every destination fifo), so the natural edge emission
already connects all sibling endpoints transitively through that
shared tile -- no separate group-id machinery needed.
- New `buildFlowAdjacency(flows, pktFlows) -> Adjacency`: one edge per
`aie.flow` `(src, dst)`; per `aie.packet_flow`, cross-product of its
`aie.packet_source`s and `aie.packet_dest`s.
- New `placeNonCoreTileByCentroid(lt, adjacencies, channelRequirements)`:
BFS through every supplied adjacency starting at `lt`, accumulating
columns of placed `CoreTile` peers along the way; place at the
rounded centroid (or the LTO's pinned column if set), respecting
channel-requirement capacity. Walking through `LogicalTileOp` peers
preserves the legacy ConnectivityGroup behaviour of seeing cores
reachable transitively through intermediate mem/shim tiles.
- Phase 4 + Phase 5 in `place()` collapse into a single iteration over
unplaced non-core LTOs, each calling the new placement function.
## Removals
- `struct ConnectivityGroup` (header)
- `buildObjectFifoGroups`, `buildFlowGroups`, `placeNonCoreTilesInGroup`
(cpp + header)
## Behavior
Identical placements on all existing lit tests (10/10 in
`test/place-tiles/`, including the multi-fifo `edge_detect`,
linked-fifo, and flow-grouping cases). Channel-requirements path is
untouched -- it's a per-tile resource counter, fundamentally not a
pairwise relation, and rightfully stays as `DenseMap<Op*, pair<in, out>>`
outside Adjacency.
Net diff: -25 lines. The unified path is shorter than the parallel one
it replaces.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0c390b0 commit 1f2fd9a
2 files changed
Lines changed: 163 additions & 188 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 25 | | |
36 | 26 | | |
37 | 27 | | |
| |||
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 89 | | |
113 | 90 | | |
114 | 91 | | |
| |||
182 | 159 | | |
183 | 160 | | |
184 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
185 | 191 | | |
186 | 192 | | |
187 | 193 | | |
| |||
0 commit comments