|
MLIR-AIE 1.4.6.dev
|
#include "aie/Dialect/AIE/Transforms/AIEPlacer.h"
Classes | |
| struct | Adjacency |
| struct | CollectedOps |
| struct | ShimSide |
| class | PinnedChannels |
| class | PinnedChannelUse |
| class | RuntimeBdIds |
| struct | DdrGroup |
| struct | OverlayFit |
| struct | StreamNet |
Public Types | |
| using | AllocateInfo = std::pair<mlir::Operation *, TileID> |
| using | ShareableShimEnds |
Public Member Functions | |
| Placer ()=default | |
| virtual | ~Placer ()=default |
| virtual void | initialize (DeviceOp device, bool controlOverlay, bool adaptiveOverlay, bool packetSwitched) |
| void | setNeighbourCores (llvm::DenseMap< mlir::Operation *, unsigned > keys, llvm::SmallVector< llvm::DenseMap< TileID, unsigned > > neighbours) |
| virtual mlir::LogicalResult | place (DeviceOp device)=0 |
| virtual llvm::StringRef | getName () const =0 |
| std::optional< TileID > | getPlacement (mlir::Operation *logicalTile) const |
| llvm::SmallVector< AllocateInfo > & | getAllocates () |
Static Public Member Functions | |
| static CollectedOps | collectOperations (DeviceOp device) |
| static llvm::MapVector< mlir::Operation *, std::pair< int, int > > | flowChannelDemand (llvm::ArrayRef< FlowOp > flows, llvm::ArrayRef< PacketFlowOp > pktFlows, llvm::ArrayRef< RouteOp > routes, llvm::ArrayRef< DMAChannelAnalysis::ChannelClaim > claims, llvm::DenseMap< mlir::Operation *, llvm::SmallVector< std::pair< int, int > > > *named=nullptr, llvm::DenseMap< mlir::Operation *, mlir::Operation * > *keys=nullptr) |
| static bool | satisfiesConstraints (mlir::Operation *tile, TileID pos) |
| static Adjacency | buildCascadeAdjacency (llvm::ArrayRef< CascadeFlowOp > cascadeFlows) |
| static Adjacency | buildComputePeerAdjacency (llvm::ArrayRef< ObjectFifoCreateOp > objectFifos) |
| static Adjacency | buildSharedMemAdjacency (llvm::ArrayRef< ObjectFifoCreateOp > objectFifos) |
| static Adjacency | buildObjectFifoAdjacency (llvm::ArrayRef< ObjectFifoCreateOp > objectFifos) |
| static Adjacency | buildFlowAdjacency (llvm::ArrayRef< FlowOp > flows, llvm::ArrayRef< PacketFlowOp > pktFlows) |
| static ShareableShimEnds | collectShareableShimEnds (DeviceOp device, llvm::ArrayRef< ObjectFifoCreateOp > objectFifos, const llvm::DenseMap< mlir::Operation *, unsigned > &rank, const llvm::DenseMap< mlir::Operation *, mlir::Operation * > &routeKeys={}) |
| static int | shimChannelsSaved (const ShimTransferSpans &spans, llvm::ArrayRef< const ShimSide * > sides, llvm::ArrayRef< mlir::StringAttr > extra, llvm::ArrayRef< int > pinnedHere) |
| static llvm::DenseMap< mlir::StringAttr, llvm::SmallVector< ShimTransferSpans::Gate > > | provenShimGates (DeviceOp device) |
Protected Member Functions | |
| int64_t | ddrSpread (llvm::function_ref< std::optional< int >(mlir::Operation *)> columnOf, int weight) const |
| int64_t | ddrGroupSpread (const DdrGroup &group, llvm::function_ref< std::optional< int >(mlir::Operation *)> columnOf, int weight) const |
| void | buildShimModel (DeviceOp device, llvm::ArrayRef< ObjectFifoCreateOp > objectFifos, llvm::ArrayRef< DMAChannelAnalysis::ChannelClaim > claims, const llvm::DenseMap< mlir::Operation *, unsigned > &rank, const llvm::DenseMap< mlir::Operation *, mlir::Operation * > &routeKeys={}) |
| bool | overlayChannels (TileID tile) const |
| OverlayFit | overlayAt (TileID at, const PinnedChannelUse &pins, llvm::ArrayRef< PinnedChannels::End > extra, llvm::ArrayRef< mlir::Operation * > tilesHere, const ShimTransferSpans *spans) const |
| void | collectOverlayUses (DeviceOp device) |
| llvm::SmallVector< mlir::Operation * > | overlayTileOps () const |
| void | buildStreamDemand (llvm::ArrayRef< ObjectFifoCreateOp > objectFifos) |
| void | buildStreamNets (DeviceOp device, const CollectedOps &collected) |
| bool | streamOf (const StreamNet &net, llvm::function_ref< std::optional< TileID >(mlir::Operation *)> at, TileID &src, llvm::SmallVectorImpl< TileID > &dsts) const |
| std::optional< std::pair< mlir::Operation *, std::pair< int, int > > > | namedClash (mlir::Operation *tile, llvm::ArrayRef< mlir::Operation * > others) const |
| mlir::LogicalResult | emitNamedClash (mlir::Operation *tile, TileID at, std::pair< mlir::Operation *, std::pair< int, int > > clash) const |
Protected Attributes | |
| llvm::DenseMap< mlir::Operation *, llvm::SmallVector< DMAChannelAnalysis::ChannelClaim > > | claimsOf |
| std::optional< ShimTransferSpans > | shimSpans |
| ShareableShimEnds | shareableShimEnds |
| RuntimeBdIds | runtimeBdIds |
| llvm::SmallVector< DdrGroup > | ddrGroups |
| llvm::DenseMap< mlir::Operation *, llvm::SmallVector< unsigned > > | ddrGroupsOf |
| int | ddrShimColumns = 0 |
| ShimMM2SUses | overlayUses |
| llvm::DenseMap< mlir::Operation *, StreamDemand > | streamDemand |
| llvm::DenseMap< mlir::Operation *, llvm::SmallVector< mlir::Operation * > > | incomingFifos |
| llvm::DenseMap< mlir::Operation *, int > | broadcastFanout |
| llvm::SmallVector< StreamNet > | streamNets |
| llvm::DenseMap< mlir::Operation *, llvm::SmallVector< unsigned > > | streamNetsOf |
| llvm::DenseMap< mlir::Operation *, llvm::SmallVector< std::pair< int, int > > > | namedChannels |
| llvm::DenseMap< mlir::Operation *, unsigned > | coreKeys |
| llvm::SmallVector< llvm::DenseMap< TileID, unsigned > > | neighbourCores |
| PlacementResult | result |
| llvm::SmallVector< AllocateInfo > | allocates |
| const AIETargetModel * | targetModel = nullptr |
| bool | controlOverlay = false |
| bool | adaptiveOverlay = true |
| bool | packetSwitched = false |
| TileAvailability | availability |
Definition at line 110 of file AIEPlacer.h.
| using xilinx::AIE::Placer::AllocateInfo = std::pair<mlir::Operation *, TileID> |
Definition at line 143 of file AIEPlacer.h.
Definition at line 234 of file AIEPlacer.h.
|
default |
|
virtualdefault |
References adaptiveOverlay, controlOverlay, and packetSwitched.
|
static |
Definition at line 1363 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::Adjacency::addEdge().
Referenced by xilinx::AIE::SequentialPlacer::place().
|
static |
Definition at line 1376 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::Adjacency::addEdge().
Referenced by xilinx::AIE::SequentialPlacer::place().
|
static |
Definition at line 2339 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::Adjacency::addEdgeFromValues().
|
static |
Definition at line 1645 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::Adjacency::addEdgeFromValues().
|
static |
Definition at line 1404 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::Adjacency::addEdgeFromValues().
Referenced by xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 1746 of file AIEPlacer.cpp.
References claimsOf, collectOverlayUses(), collectShareableShimEnds(), controlOverlay, ddrGroups, ddrGroupsOf, ddrShimColumns, xilinx::AIE::ShimTransferSpans::endOf(), xilinx::AIE::Placer::ShimSide::ends, provenShimGates(), runtimeBdIds, shareableShimEnds, xilinx::AIE::Placer::ShimSide::shared, shimSpans, targetModel, xilinx::AIE::Placer::DdrGroup::tiles, xilinx::AIE::Placer::DdrGroup::together, and xilinx::AIE::Placer::DdrGroup::weights.
Referenced by xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 3010 of file AIEPlacer.cpp.
References broadcastFanout, incomingFifos, and streamDemand.
Referenced by xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 3127 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::StreamNet::delegate, xilinx::AIE::Placer::StreamNet::dsts, xilinx::AIE::Placer::CollectedOps::flows, xilinx::AIE::isPacketSwitched(), xilinx::AIE::Placer::StreamNet::link, xilinx::AIE::Placer::StreamNet::mayShare, xilinx::AIE::Placer::CollectedOps::objectFifoAllocates, xilinx::AIE::Placer::CollectedOps::objectFifos, xilinx::AIE::Placer::StreamNet::packet, packetSwitched, xilinx::AIE::Placer::CollectedOps::pktFlows, xilinx::AIE::Placer::CollectedOps::routes, xilinx::AIE::Placer::StreamNet::src, streamNets, and streamNetsOf.
Referenced by xilinx::AIE::SequentialPlacer::place().
|
static |
Definition at line 95 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::CollectedOps::cascadeFlows, xilinx::AIE::Placer::CollectedOps::flows, xilinx::AIE::Placer::CollectedOps::logicalTiles, xilinx::AIE::Placer::CollectedOps::objectFifoAllocates, xilinx::AIE::Placer::CollectedOps::objectFifoLinks, xilinx::AIE::Placer::CollectedOps::objectFifos, xilinx::AIE::StructuralGraph::of(), xilinx::AIE::Placer::CollectedOps::pktFlows, xilinx::AIE::Placer::CollectedOps::rank, xilinx::AIE::StructuralGraph::rank(), and xilinx::AIE::Placer::CollectedOps::routes.
Referenced by xilinx::AIE::SequentialPlacer::place(), and provenShimGates().
|
protected |
Definition at line 2124 of file AIEPlacer.cpp.
References xilinx::AIE::ShimMM2SUses::circuits, controlOverlay, xilinx::AIE::Placer::PinnedChannels::endOf(), xilinx::AIE::getsColumnControlOverlay(), xilinx::AIE::isPacketSwitched(), overlayUses, xilinx::AIE::ShimMM2SUses::packetEnds, xilinx::AIE::ShimMM2SUses::packetFlows, packetSwitched, and xilinx::AIE::shimMM2SUses().
Referenced by buildShimModel().
|
static |
Definition at line 1653 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::ShimSide::ends, and xilinx::AIE::Placer::ShimSide::pinned.
Referenced by buildShimModel().
|
protected |
Definition at line 1831 of file AIEPlacer.cpp.
References ddrShimColumns, xilinx::AIE::Placer::DdrGroup::tiles, xilinx::AIE::Placer::DdrGroup::together, and xilinx::AIE::Placer::DdrGroup::weights.
Referenced by ddrSpread().
|
protected |
Definition at line 1822 of file AIEPlacer.cpp.
References ddrGroups, and ddrGroupSpread().
|
protected |
Definition at line 2105 of file AIEPlacer.cpp.
References targetModel.
|
static |
Definition at line 2370 of file AIEPlacer.cpp.
Referenced by xilinx::AIE::SequentialPlacer::place().
|
inline |
Definition at line 144 of file AIEPlacer.h.
References allocates.
|
pure virtual |
Implemented in xilinx::AIE::SAPlacer, and xilinx::AIE::SequentialPlacer.
|
inline |
Definition at line 133 of file AIEPlacer.h.
References result.
|
virtual |
Reimplemented in xilinx::AIE::SequentialPlacer.
Definition at line 62 of file AIEPlacer.cpp.
References adaptiveOverlay, availability, xilinx::AIE::AIETargetModel::columns(), controlOverlay, xilinx::AIE::AIETargetModel::getTileType(), packetSwitched, xilinx::AIE::AIETargetModel::rows(), and targetModel.
Referenced by xilinx::AIE::SequentialPlacer::initialize().
|
protected |
Definition at line 2090 of file AIEPlacer.cpp.
References namedChannels.
|
protected |
Definition at line 2170 of file AIEPlacer.cpp.
References adaptiveOverlay, xilinx::AIE::ShimTransferSpans::apart(), overlayChannels(), xilinx::AIE::ShimTransferSpans::overlayEnd(), overlayUses, xilinx::AIE::Placer::PinnedChannelUse::sendingAt(), and targetModel.
|
inlineprotected |
Definition at line 474 of file AIEPlacer.h.
References controlOverlay, and targetModel.
Referenced by overlayAt().
|
protected |
Definition at line 2159 of file AIEPlacer.cpp.
References overlayUses.
Referenced by xilinx::AIE::SequentialPlacer::place().
|
pure virtual |
Implemented in xilinx::AIE::SAPlacer, and xilinx::AIE::SequentialPlacer.
|
static |
Definition at line 2243 of file AIEPlacer.cpp.
References collectOperations(), xilinx::AIE::AIETargetModel::columns(), xilinx::AIE::createAIEObjectFifoSplitPass(), xilinx::AIE::createAIEObjectFifoVerifyPass(), xilinx::AIE::AIETargetModel::getTileType(), xilinx::AIE::ShimTransferSpans::keyOf(), xilinx::AIE::Placer::CollectedOps::logicalTiles, xilinx::AIE::ShimTransferSpans::provenGates(), xilinx::AIE::AIETargetModel::rows(), and satisfiesConstraints().
Referenced by buildShimModel().
|
static |
Definition at line 123 of file AIEPlacer.cpp.
Referenced by provenShimGates().
|
inline |
Definition at line 122 of file AIEPlacer.h.
References coreKeys, and neighbourCores.
|
static |
Definition at line 1727 of file AIEPlacer.cpp.
References xilinx::AIE::ShimTransferSpans::Plan::groups, and xilinx::AIE::ShimTransferSpans::plan().
|
protected |
Definition at line 3183 of file AIEPlacer.cpp.
References xilinx::AIE::Placer::StreamNet::delegate, xilinx::AIE::Placer::StreamNet::dsts, xilinx::AIE::Placer::StreamNet::link, xilinx::AIE::Placer::StreamNet::mayShare, xilinx::AIE::AIETargetModel::None, xilinx::AIE::Placer::StreamNet::src, and targetModel.
|
protected |
Definition at line 558 of file AIEPlacer.h.
Referenced by initialize(), xilinx::AIE::SequentialPlacer::initialize(), overlayAt(), and ~Placer().
|
protected |
Definition at line 555 of file AIEPlacer.h.
Referenced by getAllocates().
|
protected |
Definition at line 561 of file AIEPlacer.h.
Referenced by initialize(), xilinx::AIE::SequentialPlacer::initialize(), and xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 510 of file AIEPlacer.h.
Referenced by buildStreamDemand(), and xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 431 of file AIEPlacer.h.
Referenced by buildShimModel(), and xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 557 of file AIEPlacer.h.
Referenced by buildShimModel(), collectOverlayUses(), initialize(), xilinx::AIE::SequentialPlacer::initialize(), overlayChannels(), and ~Placer().
|
protected |
Definition at line 551 of file AIEPlacer.h.
Referenced by setNeighbourCores().
|
protected |
Definition at line 448 of file AIEPlacer.h.
Referenced by buildShimModel(), and ddrSpread().
|
protected |
Definition at line 450 of file AIEPlacer.h.
Referenced by buildShimModel().
|
protected |
Definition at line 451 of file AIEPlacer.h.
Referenced by buildShimModel(), and ddrGroupSpread().
|
protected |
Definition at line 508 of file AIEPlacer.h.
Referenced by buildStreamDemand().
|
protected |
Definition at line 538 of file AIEPlacer.h.
Referenced by namedClash(), and xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 552 of file AIEPlacer.h.
Referenced by setNeighbourCores().
|
protected |
Definition at line 499 of file AIEPlacer.h.
Referenced by collectOverlayUses(), overlayAt(), and overlayTileOps().
|
protected |
Definition at line 560 of file AIEPlacer.h.
Referenced by buildStreamNets(), collectOverlayUses(), initialize(), xilinx::AIE::SequentialPlacer::initialize(), and ~Placer().
|
protected |
Definition at line 554 of file AIEPlacer.h.
Referenced by getPlacement().
|
protected |
Definition at line 438 of file AIEPlacer.h.
Referenced by buildShimModel().
|
protected |
Definition at line 435 of file AIEPlacer.h.
Referenced by buildShimModel().
|
protected |
Definition at line 434 of file AIEPlacer.h.
Referenced by buildShimModel().
|
protected |
Definition at line 505 of file AIEPlacer.h.
Referenced by buildStreamDemand(), and xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 526 of file AIEPlacer.h.
Referenced by buildStreamNets(), and xilinx::AIE::SequentialPlacer::place().
|
protected |
Definition at line 528 of file AIEPlacer.h.
Referenced by buildStreamNets().
|
protected |
Definition at line 556 of file AIEPlacer.h.
Referenced by buildShimModel(), emitNamedClash(), initialize(), xilinx::AIE::SequentialPlacer::initialize(), overlayAt(), overlayChannels(), xilinx::AIE::SequentialPlacer::place(), and streamOf().