MLIR-AIE 1.4.6.dev
xilinx::AIE::Placer Class Referenceabstract

#include "aie/Dialect/AIE/Transforms/AIEPlacer.h"

Inheritance diagram for xilinx::AIE::Placer:
Collaboration diagram for xilinx::AIE::Placer:

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

Detailed Description

Definition at line 110 of file AIEPlacer.h.

Member Typedef Documentation

◆ AllocateInfo

using xilinx::AIE::Placer::AllocateInfo = std::pair<mlir::Operation *, TileID>

Definition at line 143 of file AIEPlacer.h.

◆ ShareableShimEnds

Initial value:
llvm::MapVector<mlir::Operation *, std::array<ShimSide, 2>>

Definition at line 234 of file AIEPlacer.h.

Constructor & Destructor Documentation

◆ Placer()

xilinx::AIE::Placer::Placer ( )
default

◆ ~Placer()

virtual xilinx::AIE::Placer::~Placer ( )
virtualdefault

Member Function Documentation

◆ buildCascadeAdjacency()

Placer::Adjacency Placer::buildCascadeAdjacency ( llvm::ArrayRef< CascadeFlowOp > cascadeFlows)
static

◆ buildComputePeerAdjacency()

Placer::Adjacency Placer::buildComputePeerAdjacency ( llvm::ArrayRef< ObjectFifoCreateOp > objectFifos)
static

◆ buildFlowAdjacency()

Placer::Adjacency Placer::buildFlowAdjacency ( llvm::ArrayRef< FlowOp > flows,
llvm::ArrayRef< PacketFlowOp > pktFlows )
static

◆ buildObjectFifoAdjacency()

Placer::Adjacency Placer::buildObjectFifoAdjacency ( llvm::ArrayRef< ObjectFifoCreateOp > objectFifos)
static

◆ buildSharedMemAdjacency()

Placer::Adjacency Placer::buildSharedMemAdjacency ( llvm::ArrayRef< ObjectFifoCreateOp > objectFifos)
static

◆ buildShimModel()

void Placer::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 = {} )
protected

◆ buildStreamDemand()

void Placer::buildStreamDemand ( llvm::ArrayRef< ObjectFifoCreateOp > objectFifos)
protected

Definition at line 3010 of file AIEPlacer.cpp.

References broadcastFanout, incomingFifos, and streamDemand.

Referenced by xilinx::AIE::SequentialPlacer::place().

◆ buildStreamNets()

◆ collectOperations()

◆ collectOverlayUses()

◆ collectShareableShimEnds()

Placer::ShareableShimEnds Placer::collectShareableShimEnds ( DeviceOp device,
llvm::ArrayRef< ObjectFifoCreateOp > objectFifos,
const llvm::DenseMap< mlir::Operation *, unsigned > & rank,
const llvm::DenseMap< mlir::Operation *, mlir::Operation * > & routeKeys = {} )
static

◆ ddrGroupSpread()

int64_t Placer::ddrGroupSpread ( const DdrGroup & group,
llvm::function_ref< std::optional< int >(mlir::Operation *)> columnOf,
int weight ) const
protected

◆ ddrSpread()

int64_t Placer::ddrSpread ( llvm::function_ref< std::optional< int >(mlir::Operation *)> columnOf,
int weight ) const
protected

Definition at line 1822 of file AIEPlacer.cpp.

References ddrGroups, and ddrGroupSpread().

◆ emitNamedClash()

LogicalResult Placer::emitNamedClash ( mlir::Operation * tile,
TileID at,
std::pair< mlir::Operation *, std::pair< int, int > > clash ) const
protected

Definition at line 2105 of file AIEPlacer.cpp.

References targetModel.

◆ flowChannelDemand()

llvm::MapVector< Operation *, std::pair< int, int > > Placer::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

Definition at line 2370 of file AIEPlacer.cpp.

Referenced by xilinx::AIE::SequentialPlacer::place().

◆ getAllocates()

llvm::SmallVector< AllocateInfo > & xilinx::AIE::Placer::getAllocates ( )
inline

Definition at line 144 of file AIEPlacer.h.

References allocates.

◆ getName()

virtual llvm::StringRef xilinx::AIE::Placer::getName ( ) const
pure virtual

◆ getPlacement()

std::optional< TileID > xilinx::AIE::Placer::getPlacement ( mlir::Operation * logicalTile) const
inline

Definition at line 133 of file AIEPlacer.h.

References result.

◆ initialize()

void Placer::initialize ( DeviceOp device,
bool controlOverlay,
bool adaptiveOverlay,
bool packetSwitched )
virtual

◆ namedClash()

std::optional< std::pair< Operation *, std::pair< int, int > > > Placer::namedClash ( mlir::Operation * tile,
llvm::ArrayRef< mlir::Operation * > others ) const
protected

Definition at line 2090 of file AIEPlacer.cpp.

References namedChannels.

◆ overlayAt()

Placer::OverlayFit Placer::overlayAt ( TileID at,
const PinnedChannelUse & pins,
llvm::ArrayRef< PinnedChannels::End > extra,
llvm::ArrayRef< mlir::Operation * > tilesHere,
const ShimTransferSpans * spans ) const
protected

◆ overlayChannels()

bool xilinx::AIE::Placer::overlayChannels ( TileID tile) const
inlineprotected

Definition at line 474 of file AIEPlacer.h.

References controlOverlay, and targetModel.

Referenced by overlayAt().

◆ overlayTileOps()

SmallVector< Operation * > Placer::overlayTileOps ( ) const
protected

Definition at line 2159 of file AIEPlacer.cpp.

References overlayUses.

Referenced by xilinx::AIE::SequentialPlacer::place().

◆ place()

virtual mlir::LogicalResult xilinx::AIE::Placer::place ( DeviceOp device)
pure virtual

◆ provenShimGates()

◆ satisfiesConstraints()

bool Placer::satisfiesConstraints ( mlir::Operation * tile,
TileID pos )
static

Definition at line 123 of file AIEPlacer.cpp.

Referenced by provenShimGates().

◆ setNeighbourCores()

void xilinx::AIE::Placer::setNeighbourCores ( llvm::DenseMap< mlir::Operation *, unsigned > keys,
llvm::SmallVector< llvm::DenseMap< TileID, unsigned > > neighbours )
inline

Definition at line 122 of file AIEPlacer.h.

References coreKeys, and neighbourCores.

◆ shimChannelsSaved()

int Placer::shimChannelsSaved ( const ShimTransferSpans & spans,
llvm::ArrayRef< const ShimSide * > sides,
llvm::ArrayRef< mlir::StringAttr > extra,
llvm::ArrayRef< int > pinnedHere )
static

◆ streamOf()

bool Placer::streamOf ( const StreamNet & net,
llvm::function_ref< std::optional< TileID >(mlir::Operation *)> at,
TileID & src,
llvm::SmallVectorImpl< TileID > & dsts ) const
protected

Member Data Documentation

◆ adaptiveOverlay

bool xilinx::AIE::Placer::adaptiveOverlay = true
protected

◆ allocates

llvm::SmallVector<AllocateInfo> xilinx::AIE::Placer::allocates
protected

Definition at line 555 of file AIEPlacer.h.

Referenced by getAllocates().

◆ availability

TileAvailability xilinx::AIE::Placer::availability
protected

◆ broadcastFanout

llvm::DenseMap<mlir::Operation *, int> xilinx::AIE::Placer::broadcastFanout
protected

Definition at line 510 of file AIEPlacer.h.

Referenced by buildStreamDemand(), and xilinx::AIE::SequentialPlacer::place().

◆ claimsOf

llvm::DenseMap<mlir::Operation *, llvm::SmallVector<DMAChannelAnalysis::ChannelClaim> > xilinx::AIE::Placer::claimsOf
protected

Definition at line 431 of file AIEPlacer.h.

Referenced by buildShimModel(), and xilinx::AIE::SequentialPlacer::place().

◆ controlOverlay

bool xilinx::AIE::Placer::controlOverlay = false
protected

◆ coreKeys

llvm::DenseMap<mlir::Operation *, unsigned> xilinx::AIE::Placer::coreKeys
protected

Definition at line 551 of file AIEPlacer.h.

Referenced by setNeighbourCores().

◆ ddrGroups

llvm::SmallVector<DdrGroup> xilinx::AIE::Placer::ddrGroups
protected

Definition at line 448 of file AIEPlacer.h.

Referenced by buildShimModel(), and ddrSpread().

◆ ddrGroupsOf

llvm::DenseMap<mlir::Operation *, llvm::SmallVector<unsigned> > xilinx::AIE::Placer::ddrGroupsOf
protected

Definition at line 450 of file AIEPlacer.h.

Referenced by buildShimModel().

◆ ddrShimColumns

int xilinx::AIE::Placer::ddrShimColumns = 0
protected

Definition at line 451 of file AIEPlacer.h.

Referenced by buildShimModel(), and ddrGroupSpread().

◆ incomingFifos

llvm::DenseMap<mlir::Operation *, llvm::SmallVector<mlir::Operation *> > xilinx::AIE::Placer::incomingFifos
protected

Definition at line 508 of file AIEPlacer.h.

Referenced by buildStreamDemand().

◆ namedChannels

llvm::DenseMap<mlir::Operation *, llvm::SmallVector<std::pair<int, int> > > xilinx::AIE::Placer::namedChannels
protected

Definition at line 538 of file AIEPlacer.h.

Referenced by namedClash(), and xilinx::AIE::SequentialPlacer::place().

◆ neighbourCores

llvm::SmallVector<llvm::DenseMap<TileID, unsigned> > xilinx::AIE::Placer::neighbourCores
protected

Definition at line 552 of file AIEPlacer.h.

Referenced by setNeighbourCores().

◆ overlayUses

ShimMM2SUses xilinx::AIE::Placer::overlayUses
protected

Definition at line 499 of file AIEPlacer.h.

Referenced by collectOverlayUses(), overlayAt(), and overlayTileOps().

◆ packetSwitched

bool xilinx::AIE::Placer::packetSwitched = false
protected

◆ result

PlacementResult xilinx::AIE::Placer::result
protected

Definition at line 554 of file AIEPlacer.h.

Referenced by getPlacement().

◆ runtimeBdIds

RuntimeBdIds xilinx::AIE::Placer::runtimeBdIds
protected

Definition at line 438 of file AIEPlacer.h.

Referenced by buildShimModel().

◆ shareableShimEnds

ShareableShimEnds xilinx::AIE::Placer::shareableShimEnds
protected

Definition at line 435 of file AIEPlacer.h.

Referenced by buildShimModel().

◆ shimSpans

std::optional<ShimTransferSpans> xilinx::AIE::Placer::shimSpans
protected

Definition at line 434 of file AIEPlacer.h.

Referenced by buildShimModel().

◆ streamDemand

llvm::DenseMap<mlir::Operation *, StreamDemand> xilinx::AIE::Placer::streamDemand
protected

Definition at line 505 of file AIEPlacer.h.

Referenced by buildStreamDemand(), and xilinx::AIE::SequentialPlacer::place().

◆ streamNets

llvm::SmallVector<StreamNet> xilinx::AIE::Placer::streamNets
protected

Definition at line 526 of file AIEPlacer.h.

Referenced by buildStreamNets(), and xilinx::AIE::SequentialPlacer::place().

◆ streamNetsOf

llvm::DenseMap<mlir::Operation *, llvm::SmallVector<unsigned> > xilinx::AIE::Placer::streamNetsOf
protected

Definition at line 528 of file AIEPlacer.h.

Referenced by buildStreamNets().

◆ targetModel


The documentation for this class was generated from the following files: