|
MLIR-AIE 1.4.6.dev
|
Lock placement shared by aie-objectfifo-allocate and the SA placer, on plain records. More...
#include "aie/Dialect/AIE/Transforms/AIELockPlan.h"
Classes | |
| struct | Tile |
| A tile's candidate positions, and the one placement chose, once it has. More... | |
| struct | User |
| A tile using the locks, localOnly when only its own (dmaLocalOnly). More... | |
| struct | Group |
| struct | Placed |
| struct | Assignment |
Public Types | |
| using | Memo = BoundedMemo<std::vector<int64_t>, Outcome> |
| Packings by what pack() reads, the least recently used dropped first beyond its capacity. | |
Public Member Functions | |
| LockPlan (const AIETargetModel &target) | |
| unsigned | addTile (Tile tile) |
| bool | reserve (unsigned tile, int count) |
| Takes count locks on tile, or returns false when it has too few left. | |
| bool | reaches (const User &user, unsigned tile) const |
| Placed | place (const Group &group) |
| Assignment | assign (llvm::ArrayRef< Group > groups, Memo *memo=nullptr, bool callerOrder=true) |
| Places groups first fit: with callerOrder, in order on each one's candidates, then in canonical order (canonicalFirstFit); without, in canonical order only. | |
Static Public Member Functions | |
| static llvm::SmallVector< int > | groupCounts (const AIETargetModel &target, int64_t depth, int owners) |
| The lock groups owners lock owners of a pool of depth objects take, by count. | |
| static bool | dmaLocalOnly (AIETileType type) |
| Whether a DMA on a tile of type uses only its own tile's locks: every DMA does but a mem tile's. | |
| static llvm::SmallVector< mlir::Operation * > | lockOwners (const AIETargetModel &target, ObjectFifoPoolOp pool) |
| The ops whose locks allocation and the SA each make for pool: with semaphore locks, each segment without its own pair; otherwise the pool, when it has none. | |
| static bool | reaches (const AIETargetModel &target, llvm::ArrayRef< TileID > user, llvm::ArrayRef< TileID > memory, bool localOnly) |
| Whether a tile at one of user reaches memory at one of memory; with localOnly, only at its own position. | |
| static Group | group (int count, unsigned home, bool local, llvm::ArrayRef< unsigned > buffers, llvm::ArrayRef< User > users, llvm::ArrayRef< unsigned > ranked) |
| A group of count locks a pool's objects are counted by: on home, else, unless the pool must stay local, on a tile holding its buffers, one of its users' tiles, then any tile in ranked order. | |
Static Public Attributes | |
| static constexpr int64_t | kPackBudget = 1000000 |
| Steps the exact packing of groups of different counts may take on each connected component. | |
Lock placement shared by aie-objectfifo-allocate and the SA placer, on plain records.
Definition at line 32 of file AIELockPlan.h.
| using xilinx::AIE::LockPlan::Memo = BoundedMemo<std::vector<int64_t>, Outcome> |
Packings by what pack() reads, the least recently used dropped first beyond its capacity.
Definition at line 71 of file AIELockPlan.h.
|
inlineexplicit |
Definition at line 73 of file AIELockPlan.h.
|
inline |
Definition at line 100 of file AIELockPlan.h.
| LockPlan::Assignment LockPlan::assign | ( | llvm::ArrayRef< Group > | groups, |
| Memo * | memo = nullptr, | ||
| bool | callerOrder = true ) |
Places groups first fit: with callerOrder, in order on each one's candidates, then in canonical order (canonicalFirstFit); without, in canonical order only.
On a miss: exact bipartite matching when every group takes one count, else exact packing, which leaves the first-fit placement standing if no packing exists or the search runs out of kPackBudget steps. The SA places in canonical order only, so it fits only where allocation's own-order-first pass fits too.
Definition at line 36 of file AIELockPlan.cpp.
References xilinx::AIE::LockPlan::Group::count, xilinx::AIE::LockPlan::Assignment::failed, xilinx::AIE::LockPlan::Assignment::failure, xilinx::AIE::BoundedMemo< Key, Value, Hash >::find(), group(), place(), xilinx::AIE::BoundedMemo< Key, Value, Hash >::record(), xilinx::AIE::LockPlan::Assignment::stopped, xilinx::AIE::LockPlan::Assignment::tiles, and xilinx::AIE::LockPlan::Assignment::unassigned.
|
inlinestatic |
Whether a DMA on a tile of type uses only its own tile's locks: every DMA does but a mem tile's.
Definition at line 90 of file AIELockPlan.h.
|
inlinestatic |
A group of count locks a pool's objects are counted by: on home, else, unless the pool must stay local, on a tile holding its buffers, one of its users' tiles, then any tile in ranked order.
Definition at line 141 of file AIELockPlan.h.
References group().
|
inlinestatic |
The lock groups owners lock owners of a pool of depth objects take, by count.
With semaphore locks each owner is a segment taking a pair, one lock counting free objects and one full ones; otherwise the one owner is the pool, taking a binary lock per object.
Definition at line 79 of file AIELockPlan.h.
References xilinx::AIE::AIETargetModel::UsesSemaphoreLocks.
|
static |
The ops whose locks allocation and the SA each make for pool: with semaphore locks, each segment without its own pair; otherwise the pool, when it has none.
Definition at line 23 of file AIELockPlan.cpp.
References xilinx::AIE::AIETargetModel::UsesSemaphoreLocks.
Definition at line 155 of file AIELockPlan.h.
References xilinx::AIE::LockPlan::Placed::full, group(), xilinx::AIE::LockPlan::Placed::reachable, reserve(), and xilinx::AIE::LockPlan::Placed::tile.
Referenced by assign().
|
inlinestatic |
Whether a tile at one of user reaches memory at one of memory; with localOnly, only at its own position.
Definition at line 120 of file AIELockPlan.h.
References xilinx::AIE::AIETargetModel::Either, and xilinx::AIE::AIETargetModel::Second.
Referenced by reaches().
|
inline |
Definition at line 133 of file AIELockPlan.h.
References xilinx::AIE::LockPlan::User::localOnly, reaches(), and xilinx::AIE::LockPlan::User::tile.
|
inline |
Takes count locks on tile, or returns false when it has too few left.
A tile not yet placed is not counted.
Definition at line 107 of file AIELockPlan.h.
Referenced by place().
|
staticconstexpr |
Steps the exact packing of groups of different counts may take on each connected component.
Definition at line 196 of file AIELockPlan.h.