MLIR-AIE 1.4.5.dev
DmaQueueModel.h File Reference
#include "aie/Dialect/AIE/IR/AIETargetModel.h"
#include "aie/Dialect/AIEX/IR/AIEXDialect.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/Builders.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <map>
#include <set>
Include dependency graph for DmaQueueModel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xilinx::AIEX::DmaQueueModel
 Tracks, per DMA channel, the pushes not yet known to have completed along one execution path. More...
struct  xilinx::AIEX::DmaQueueModel::ChannelState
 One channel's queue: its pushes not yet known to have completed, oldest first, each true when it issues a completion token. More...
struct  xilinx::AIEX::QueueEffect
 What one op in a loop body does to a channel queue. More...
struct  xilinx::AIEX::DmaCompletionState
 Completion is distinct from queue occupancy: Task_Queue_Size excludes the running task. More...
struct  xilinx::AIEX::DmaCompletionState::Push

Namespaces

namespace  xilinx
namespace  xilinx::AIEX

Functions

std::optional< DmaQueueModel::ChannelKey > xilinx::AIEX::syncChannelKey (NpuSyncOp sync)
 The channel an aiex.npu.sync retires on, or nullopt when it cannot be pinned down.
void xilinx::AIEX::awaitSync (DmaQueueModel &queue, NpuSyncOp sync)
 Retire what an aiex.npu.sync proves has drained.
mlir::InFlightDiagnostic xilinx::AIEX::emitQueueOverflowWarning (mlir::Operation *op, int col, int row, AIE::DMAChannelDir dir, uint32_t channel, uint32_t depth, size_t outstanding)
 Shared wording for the two lowering paths, so the explanation does not depend on whether the transfer came from dma_start_task or npu.dma_memcpy_nd.
mlir::InFlightDiagnostic xilinx::AIEX::emitUnsafeBdReuseWarning (mlir::Operation *freeOp, int col, int row, AIE::DMAChannelDir dir, uint32_t channel)
 Wording for a dma_free_task that releases a buffer descriptor id the runtime pool could hand straight back out before hardware has actually finished the freed transfer – the rolled-loop counterpart to aie-assign-runtime-sequence-bd-ids's unsafe-BD-reuse warning.
std::optional< std::pair< uint32_t, uint32_t > > xilinx::AIEX::queueSpacePoll (const AIE::AIETargetModel &tm, int col, int row, uint32_t channel, AIE::DMAChannelDir dir, uint32_t depth)
 Address and mask for a poll that waits for a free task-queue slot.
mlir::LogicalResult xilinx::AIEX::insertQueueSpaceWait (mlir::Operation *before, const AIE::AIETargetModel &tm, int col, int row, uint32_t channel, AIE::DMAChannelDir dir, uint32_t depth)
void xilinx::AIEX::guardQueueOverflow (DmaQueueModel &queue, mlir::Operation *push, const AIE::AIETargetModel &tm, const DmaQueueModel::ChannelKey &key, uint32_t depth, bool enforce)
 Handle a push on key that would land on a full queue: poll where one can be emitted, warn where it cannot (see insertQueueSpaceWait above for when that is).
template<typename EffectFn>
void xilinx::AIEX::guardSequenceQueueDepth (mlir::Region &body, DmaQueueModel &queue, const AIE::AIETargetModel &tm, bool enforce, bool warnUnsafeBdReuse, EffectFn effectOf)
 Guard every push in a runtime sequence that can land on a full queue, and (when warnUnsafeBdReuse) warn at every Free effect whose own push is not yet proven complete along some reachable path.

Variables

constexpr llvm::StringLiteral xilinx::AIEX::queueDiagnosedAttr