MLIR-AIE 1.4.5.dev
xilinx::AIE::StreamWaitGraph Class Reference

Which agent waits on which. More...

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

Classes

struct  Agent
 A core, a DMA channel, or a tile's controller. More...

Public Member Functions

 StreamWaitGraph (DeviceOp device, llvm::ArrayRef< RoutedStream > streams, const StreamVolumeAnalysis &volumes)
std::optional< unsigned > agentAt (const StreamEndpoint &endpoint, bool sending) const
 The agent pushing data into (sending) or pulling data out of the fabric at endpoint, if the endpoint has one.
llvm::SmallVector< unsigned > drainersOf (unsigned agent) const
 Agents whose progress frees room in agent for more incoming data: a core frees itself, a receiving channel waits on whoever releases the locks it acquires and, if the host issues it, on what the host waits for first.
llvm::SmallVector< unsigned > waitChain (llvm::ArrayRef< unsigned > from, llvm::ArrayRef< unsigned > targets, llvm::ArrayRef< unsigned > avoid) const
 A shortest chain of waits from an agent in from to one in targets that avoids avoid, both ends included; empty when there is none.
bool isModeled (unsigned id) const
 Whether the design programs this agent, so its waits are known rather than assumed.
const Agent & getAgent (unsigned id) const
std::string describe (unsigned id) const

Detailed Description

Which agent waits on which.

An agent is a core, one DMA channel, or the controller of a tile, which sends the task-complete tokens the host waits for on its TileControl port. P waits on Q when P acquires a lock Q releases, when P sends a stream Q receives or the reverse, or when P is a runtime-issued channel the host issues only after waiting on Q. Waiting on a channel waits on the controllers of its column too, whose tokens tell the host it is done. A channel with no program in the design may wait on anything on its tile. A receiving channel that takes in all it is sent before its locks run out waits on no lock. Program order within an agent is not modeled. A DMA receiver taking one sender's data waits on none of its other DMA senders: a DMA channel sends a packet whole once it starts, so it never holds the receiver while waiting on anything. A core can pause one input while waiting on another.

Definition at line 215 of file AIEStreamDependencyAnalysis.h.

Constructor & Destructor Documentation

◆ StreamWaitGraph()

Member Function Documentation

◆ agentAt()

std::optional< unsigned > StreamWaitGraph::agentAt ( const StreamEndpoint & endpoint,
bool sending ) const

The agent pushing data into (sending) or pulling data out of the fabric at endpoint, if the endpoint has one.

Definition at line 1121 of file AIEStreamDependencyAnalysis.cpp.

References xilinx::AIE::StreamWaitGraph::Agent::at().

◆ describe()

◆ drainersOf()

SmallVector< unsigned > StreamWaitGraph::drainersOf ( unsigned agent) const

Agents whose progress frees room in agent for more incoming data: a core frees itself, a receiving channel waits on whoever releases the locks it acquires and, if the host issues it, on what the host waits for first.

Definition at line 1128 of file AIEStreamDependencyAnalysis.cpp.

References xilinx::AIE::StreamWaitGraph::Agent::Core.

◆ getAgent()

const Agent & xilinx::AIE::StreamWaitGraph::getAgent ( unsigned id) const
inline

Definition at line 262 of file AIEStreamDependencyAnalysis.h.

◆ isModeled()

bool xilinx::AIE::StreamWaitGraph::isModeled ( unsigned id) const
inline

Whether the design programs this agent, so its waits are known rather than assumed.

Definition at line 260 of file AIEStreamDependencyAnalysis.h.

◆ waitChain()

SmallVector< unsigned > StreamWaitGraph::waitChain ( llvm::ArrayRef< unsigned > from,
llvm::ArrayRef< unsigned > targets,
llvm::ArrayRef< unsigned > avoid ) const

A shortest chain of waits from an agent in from to one in targets that avoids avoid, both ends included; empty when there is none.

Definition at line 1139 of file AIEStreamDependencyAnalysis.cpp.

References xilinx::AIE::StreamWaitGraph::Agent::Channel.


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