|
MLIR-AIE 1.4.5.dev
|
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 |
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.
| StreamWaitGraph::StreamWaitGraph | ( | DeviceOp | device, |
| llvm::ArrayRef< RoutedStream > | streams, | ||
| const StreamVolumeAnalysis & | volumes ) |
Definition at line 886 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::StreamWaitGraph::Agent::at(), xilinx::AIE::StreamVolumeAnalysis::canFill(), xilinx::AIE::StreamWaitGraph::Agent::channel(), xilinx::AIE::StreamWaitGraph::Agent::Controller, xilinx::AIE::StreamWaitGraph::Agent::Core, xilinx::AIE::StreamWaitGraph::Agent::core(), xilinx::AIE::DmaChannelProgram::dma, xilinx::AIE::StreamWaitGraph::Agent::dma, and xilinx::AIE::StreamWaitGraph::Agent::kind.
| 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().
| std::string StreamWaitGraph::describe | ( | unsigned | id | ) | const |
Definition at line 1201 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::TileDMAChannel::channel, xilinx::AIE::StreamWaitGraph::Agent::Controller, xilinx::AIE::StreamWaitGraph::Agent::Core, xilinx::AIE::TileDMAChannel::dir, xilinx::AIE::StreamWaitGraph::Agent::dma, xilinx::AIE::StreamWaitGraph::Agent::kind, and xilinx::AIE::TileDMAChannel::tile.
| 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.
|
inline |
Definition at line 262 of file AIEStreamDependencyAnalysis.h.
|
inline |
Whether the design programs this agent, so its waits are known rather than assumed.
Definition at line 260 of file AIEStreamDependencyAnalysis.h.
| 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.