|
MLIR 23.0.0git
|
#include "mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h"#include "mlir/Dialect/AMDGPU/Utils/MemorySpaceUtils.h"#include "mlir/Dialect/Arith/IR/Arith.h"#include "mlir/Dialect/GPU/IR/GPUDialect.h"#include "mlir/Dialect/LLVMIR/ROCDLDialect.h"#include "mlir/Dialect/MemRef/IR/MemRef.h"#include "mlir/Dialect/MemRef/Utils/MemRefUtils.h"#include "mlir/Dialect/Utils/IndexingUtils.h"#include "mlir/Dialect/Vector/IR/VectorOps.h"#include "mlir/IR/Builders.h"#include "mlir/IR/BuiltinTypes.h"#include "mlir/IR/Diagnostics.h"#include "mlir/IR/Matchers.h"#include "mlir/IR/OpImplementation.h"#include "mlir/IR/PatternMatch.h"#include "mlir/IR/TypeUtilities.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/SmallVector.h"#include <algorithm>#include <cstdint>#include <limits>#include <optional>#include "mlir/Dialect/AMDGPU/IR/AMDGPU.cpp.inc"Go to the source code of this file.
Macros | |
| #define | GET_OP_CLASSES |
Functions | |
| template<typename OpTy> | |
| static LogicalResult | verifyIndexCount (OpTy op, StringRef indexName, MemRefType memrefType, int64_t numIndices) |
| Verifies that the number of indices matches the rank of the indexed memref, emitting an op error mentioning indexName on mismatch. | |
| static FailureOr< MemRefType > | getFatRawBufferTypeLike (MemRefType source, bool resetOffset) |
| Convert the type source to one with the same sizes and strides - and offset, unless stripOffset is true, in which case the offset is reset to 0, if the offset should be reset but the layout of source isn't either the identity layout or a strided layout, this function fails. | |
| template<typename T> | |
| static LogicalResult | verifyRawBufferOp (T &op) |
| static std::optional< uint32_t > | getConstantUint32 (Value v) |
| template<typename OpType> | |
| static bool | staticallyOutOfBounds (OpType op) |
| static LogicalResult | eraseRedundantLDSBarrierOps (LDSBarrierOp op, PatternRewriter &rewriter) |
| Remove amdgpu.lds_barrier after amdgpu.lds_barrier. | |
| static LogicalResult | foldGlobalLoadAsyncToLDSConstantMask (GlobalLoadAsyncToLDSOp op, PatternRewriter &rewriter) |
| template<typename BaseOp> | |
| static LogicalResult | verifyBase (BaseOp op) |
| template<typename DescriptorOp> | |
| static LogicalResult | verifyDescriptorOp (DescriptorOp op) |
| template<typename DescriptorOp, typename FoldAdaptor> | |
| static OpFoldResult | foldDescriptorOp (DescriptorOp op, FoldAdaptor adaptor) |
| template<typename T> | |
| static LogicalResult | verifyDsBarrierOpCommon (T &op) |
| #define GET_OP_CLASSES |
Definition at line 1537 of file AMDGPUOps.cpp.
|
static |
Remove amdgpu.lds_barrier after amdgpu.lds_barrier.
Definition at line 864 of file AMDGPUOps.cpp.
References mlir::RewriterBase::eraseOp(), and success().
|
static |
Definition at line 1262 of file AMDGPUOps.cpp.
References mlir::dispatchIndexOpFoldResults(), and mlir::foldDynamicIndexList().
|
static |
Definition at line 1041 of file AMDGPUOps.cpp.
References mlir::RewriterBase::eraseOp(), mlir::m_ConstantInt(), mlir::matchPattern(), mlir::RewriterBase::modifyOpInPlace(), and success().
|
static |
Definition at line 196 of file AMDGPUOps.cpp.
References mlir::Value::getType(), mlir::Type::isInteger(), mlir::m_ConstantInt(), and mlir::matchPattern().
Referenced by staticallyOutOfBounds().
|
static |
Convert the type source to one with the same sizes and strides - and offset, unless stripOffset is true, in which case the offset is reset to 0, if the offset should be reset but the layout of source isn't either the identity layout or a strided layout, this function fails.
Definition at line 87 of file AMDGPUOps.cpp.
References mlir::computeSuffixProduct(), mlir::AffineMap::getMultiDimIdentityMap(), mlir::MemRefType::Builder::setLayout(), and mlir::MemRefType::Builder::setMemorySpace().
|
static |
Definition at line 206 of file AMDGPUOps.cpp.
References getConstantUint32(), and result.
|
static |
Definition at line 1158 of file AMDGPUOps.cpp.
References mlir::Type::getIntOrFloatBitWidth(), mlir::amdgpu::isGlobalMemorySpace(), mlir::amdgpu::isWorkgroupMemorySpace(), success(), and verifyIndexCount().
|
static |
Definition at line 1213 of file AMDGPUOps.cpp.
References mlir::amdgpu::isWorkgroupMemorySpace(), success(), and verifyIndexCount().
|
static |
Definition at line 1465 of file AMDGPUOps.cpp.
References mlir::amdgpu::isWorkgroupMemorySpace(), success(), and verifyIndexCount().
|
static |
Verifies that the number of indices matches the rank of the indexed memref, emitting an op error mentioning indexName on mismatch.
Definition at line 45 of file AMDGPUOps.cpp.
References success().
Referenced by verifyBase(), verifyDescriptorOp(), verifyDsBarrierOpCommon(), and verifyRawBufferOp().
|
static |
Definition at line 158 of file AMDGPUOps.cpp.
References mlir::amdgpu::isGlobalMemorySpace(), and verifyIndexCount().