|
MLIR 24.0.0git
|
#include "mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"#include "mlir/Dialect/Arith/Transforms/Passes.h"#include "mlir/Dialect/LLVMIR/LLVMArithOps.h"#include "mlir/Dialect/LLVMIR/LLVMCallOps.h"#include "mlir/Dialect/LLVMIR/LLVMConstantOps.h"#include "mlir/Dialect/LLVMIR/LLVMConversionOps.h"#include "mlir/Dialect/LLVMIR/LLVMFloatIntrinsicOps.h"#include "mlir/Dialect/LLVMIR/LLVMMemoryOps.h"#include "mlir/Dialect/LLVMIR/LLVMModuleOps.h"#include "mlir/Dialect/LLVMIR/LLVMTerminatorOps.h"#include "mlir/Pass/Pass.h"#include "mlir/Pass/PassManager.h"#include "mlir/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.h"#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"#include "mlir/Conversion/ConvertToLLVM/ToLLVMPass.h"#include "mlir/Conversion/GPUCommon/GPUCommonPass.h"#include "mlir/Conversion/LLVMCommon/ConversionTarget.h"#include "mlir/Conversion/LLVMCommon/LoweringOptions.h"#include "mlir/Conversion/LLVMCommon/Pattern.h"#include "mlir/Conversion/LLVMCommon/TypeConverter.h"#include "mlir/Conversion/MathToLLVM/MathToLLVM.h"#include "mlir/Conversion/MathToROCDL/MathToROCDL.h"#include "mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h"#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"#include "mlir/Dialect/Func/IR/FuncOps.h"#include "mlir/Dialect/GPU/IR/GPUDialect.h"#include "mlir/Dialect/GPU/Transforms/Passes.h"#include "mlir/Dialect/GPU/Transforms/ROCDL/Passes.h"#include "mlir/Dialect/LLVMIR/ROCDLAttributes.h"#include "mlir/Dialect/LLVMIR/ROCDLIndexOps.h"#include "mlir/Dialect/LLVMIR/ROCDLLaneOps.h"#include "mlir/Dialect/LLVMIR/ROCDLSyncOps.h"#include "mlir/Dialect/MemRef/IR/MemRef.h"#include "mlir/Dialect/Vector/IR/VectorOps.h"#include "mlir/IR/BuiltinAttributes.h"#include "mlir/IR/Matchers.h"#include "mlir/Transforms/DialectConversion.h"#include "mlir/Transforms/GreedyPatternRewriteDriver.h"#include "../GPUCommon/GPUOpsLowering.h"#include "../GPUCommon/IndexIntrinsicsOpLowering.h"#include "mlir/Conversion/Passes.h.inc"#include "GPUToROCDL.cpp.inc"Go to the source code of this file.
Classes | |
| class | mlir::impl::ConvertGpuOpsToROCDLOpsBase< DerivedT > |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::impl |
| Attribute collections provide a dictionary-like interface. | |
Macros | |
| #define | GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS |
Functions | |
| std::unique_ptr<::mlir::Pass > | mlir::impl::createConvertGpuOpsToROCDLOps () |
| std::unique_ptr<::mlir::Pass > | mlir::impl::createConvertGpuOpsToROCDLOps (ConvertGpuOpsToROCDLOpsOptions options) |
| std::unique_ptr<::mlir::Pass > | mlir::createConvertGpuOpsToROCDLOps () |
| std::unique_ptr<::mlir::Pass > | mlir::createConvertGpuOpsToROCDLOps (ConvertGpuOpsToROCDLOpsOptions options) |
| static Value | truncOrExtToLLVMType (ConversionPatternRewriter &rewriter, Location loc, Value value, const LLVMTypeConverter &converter) |
| static bool | canBeCalledWithBarePointers (gpu::GPUFuncOp func) |
| Returns true if the given gpu.func can be safely called using the bare pointer calling convention. | |
| static Value | getLaneId (RewriterBase &rewriter, Location loc) |
| static Value | getKnownOrOcklDim (RewriterBase &rewriter, gpu::index_lowering::IndexKind indexKind, gpu::Dimension dim, Operation *contextOp, std::optional< uint32_t > opUpperBound) |
| Emits a call to an OCKL block/grid size function corresponding to indexKind with argument dim, except that if the context around contextOp gives an exact size for that dimension, return that as an i64 constant instead. | |
Variables | |
| static constexpr int64_t | kMaxThreadsPerBlockDim = 1024 |
| Maximum number of threads per block dimension on AMD GPUs. | |
| static constexpr StringLiteral | amdgcnDataLayout |
| #define GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS |
Definition at line 58 of file LowerGpuOpsToROCDLOps.cpp.
|
static |
Returns true if the given gpu.func can be safely called using the bare pointer calling convention.
Definition at line 85 of file LowerGpuOpsToROCDLOps.cpp.
References mlir::LLVMTypeConverter::canConvertToBarePtr().
|
static |
Emits a call to an OCKL block/grid size function corresponding to indexKind with argument dim, except that if the context around contextOp gives an exact size for that dimension, return that as an i64 constant instead.
Definition at line 124 of file LowerGpuOpsToROCDLOps.cpp.
References mlir::Builder::getArrayAttr(), mlir::Operation::getContext(), mlir::Builder::getDictionaryAttr(), mlir::Builder::getI64IntegerAttr(), mlir::gpu::getKnownDimensionSizeAround(), mlir::Operation::getLoc(), mlir::Builder::getNamedAttr(), mlir::getOrDefineFunction(), mlir::Operation::getParentWithTrait(), and kMaxThreadsPerBlockDim.
|
static |
Definition at line 93 of file LowerGpuOpsToROCDLOps.cpp.
References mlir::arith::ConstantIntOp::create(), mlir::Builder::getArrayAttr(), mlir::Builder::getContext(), mlir::Builder::getDictionaryAttr(), mlir::Builder::getNamedAttr(), and mlir::Builder::getUnitAttr().
|
static |
Definition at line 66 of file LowerGpuOpsToROCDLOps.cpp.
References mlir::LLVMTypeConverter::getIndexTypeBitwidth(), and mlir::Value::getType().
|
staticconstexpr |
Definition at line 182 of file LowerGpuOpsToROCDLOps.cpp.
|
staticconstexpr |
Maximum number of threads per block dimension on AMD GPUs.
Definition at line 118 of file LowerGpuOpsToROCDLOps.cpp.
Referenced by getKnownOrOcklDim().