MLIR  20.0.0git
Namespaces | Macros | Functions | Variables
LowerGpuOpsToROCDLOps.cpp File Reference
#include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h"
#include "mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"
#include "mlir/Dialect/Arith/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.h"
#include "mlir/Conversion/ArithToLLVM/ArithToLLVM.h"
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.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/Conversion/MemRefToLLVM/MemRefToLLVM.h"
#include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.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/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/LLVMIR/ROCDLDialect.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/FormatVariadic.h"
#include "../GPUCommon/GPUOpsLowering.h"
#include "../GPUCommon/IndexIntrinsicsOpLowering.h"
#include "../GPUCommon/OpToFuncCallLowering.h"
#include "mlir/Conversion/Passes.h.inc"
#include "GPUToROCDL.cpp.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Macros

#define GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS
 

Functions

static bool canBeCalledWithBarePointers (gpu::GPUFuncOp func)
 Returns true if the given gpu.func can be safely called using the bare pointer calling convention. More...
 
Value getLaneId (ConversionPatternRewriter &rewriter, Location loc, const unsigned indexBitwidth)
 
template<typename OpTy >
static void populateOpPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns, StringRef f32Func, StringRef f64Func, StringRef f32ApproxFunc, StringRef f16Func)
 

Variables

static constexpr StringLiteral amdgcnDataLayout
 

Macro Definition Documentation

◆ GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS

#define GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS

Definition at line 53 of file LowerGpuOpsToROCDLOps.cpp.

Function Documentation

◆ canBeCalledWithBarePointers()

static bool canBeCalledWithBarePointers ( gpu::GPUFuncOp  func)
static

Returns true if the given gpu.func can be safely called using the bare pointer calling convention.

Definition at line 61 of file LowerGpuOpsToROCDLOps.cpp.

References mlir::LLVMTypeConverter::canConvertToBarePtr().

◆ getLaneId()

Value getLaneId ( ConversionPatternRewriter rewriter,
Location  loc,
const unsigned  indexBitwidth 
)

◆ populateOpPatterns()

template<typename OpTy >
static void populateOpPatterns ( const LLVMTypeConverter converter,
RewritePatternSet patterns,
StringRef  f32Func,
StringRef  f64Func,
StringRef  f32ApproxFunc,
StringRef  f16Func 
)
static

Definition at line 346 of file LowerGpuOpsToROCDLOps.cpp.

References mlir::RewritePatternSet::add().

Variable Documentation

◆ amdgcnDataLayout

constexpr StringLiteral amdgcnDataLayout
staticconstexpr
Initial value:
=
"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32"
"-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:"
"32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:"
"64-S32-A5-G1-ni:7:8:9"

Definition at line 80 of file LowerGpuOpsToROCDLOps.cpp.