MLIR
20.0.0git
|
#include "mlir/Conversion/GPUCommon/GPUCommonPass.h"
#include "mlir/Conversion/ArithToLLVM/ArithToLLVM.h"
#include "mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h"
#include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h"
#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
#include "mlir/Conversion/ConvertToLLVM/ToLLVMPass.h"
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h"
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h"
#include "mlir/Conversion/LLVMCommon/ConversionTarget.h"
#include "mlir/Conversion/LLVMCommon/Pattern.h"
#include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h"
#include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
#include "mlir/Dialect/Async/IR/Async.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/GPU/Transforms/Passes.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "mlir/Conversion/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
mlir | |
Include the generated interface declarations. | |
Macros | |
#define | DEBUG_TYPE "gpu-to-llvm" |
#define | GEN_PASS_DEF_GPUTOLLVMCONVERSIONPASS |
#define | DECLARE_CONVERT_OP_TO_GPU_RUNTIME_CALL_PATTERN(op_name) |
Generic rewriting rule for operation on sparse matrices. More... | |
Functions | |
static int32_t | getCuSparseIndexTypeFrom (Type type) |
static int32_t | getCuSparseLtDataTypeFrom (Type type) |
static int32_t | getCuSparseDataTypeFrom (Type type) |
static gpu::Prune2To4SpMatFlag | get2To4PruneFlag (Value spMat) |
static bool | is2To4Sparsity (Value spMat) |
static bool | isSpMMCusparseLtOp (Value op) |
static LogicalResult | areAllLLVMTypes (Operation *op, ValueRange operands, ConversionPatternRewriter &rewriter) |
static LogicalResult | isAsyncWithOneDependency (ConversionPatternRewriter &rewriter, gpu::AsyncOpInterface op) |
static bool | isGpuAsyncTokenType (Value value) |
static bool | isDefinedByCallTo (Value value, StringRef functionName) |
static Value | bitAndAddrspaceCast (Location loc, ConversionPatternRewriter &rewriter, LLVM::LLVMPointerType destinationType, Value sourcePtr, const LLVMTypeConverter &typeConverter) |
template<typename T > | |
static Value | genConstInt32From (OpBuilder &builder, Location loc, T tValue) |
template<typename T > | |
static Value | genConstFloat32From (OpBuilder &builder, Location loc, T tValue) |
template<typename T > | |
static void | addOpaquePointerConversion (LLVMTypeConverter &converter) |
#define DEBUG_TYPE "gpu-to-llvm" |
Definition at line 43 of file GPUToLLVMConversion.cpp.
#define DECLARE_CONVERT_OP_TO_GPU_RUNTIME_CALL_PATTERN | ( | op_name | ) |
Generic rewriting rule for operation on sparse matrices.
Currently supports CUDA (by means of cuSparse and cuSparseLt).
Definition at line 484 of file GPUToLLVMConversion.cpp.
#define GEN_PASS_DEF_GPUTOLLVMCONVERSIONPASS |
Definition at line 46 of file GPUToLLVMConversion.cpp.
|
static |
Definition at line 1483 of file GPUToLLVMConversion.cpp.
References mlir::TypeConverter::addConversion(), mlir::get(), and mlir::LLVMTypeConverter::getContext().
|
static |
Definition at line 670 of file GPUToLLVMConversion.cpp.
References mlir::Value::getType(), mlir::LLVM::isCompatibleType(), and mlir::RewriterBase::notifyMatchFailure().
|
static |
Definition at line 982 of file GPUToLLVMConversion.cpp.
References mlir::OpBuilder::create(), mlir::get(), mlir::Builder::getContext(), and mlir::Value::getType().
|
static |
Definition at line 1096 of file GPUToLLVMConversion.cpp.
References mlir::OpBuilder::create(), mlir::Builder::getF32FloatAttr(), and mlir::Builder::getF32Type().
|
static |
Definition at line 1089 of file GPUToLLVMConversion.cpp.
References mlir::OpBuilder::create(), and mlir::Builder::getIntegerType().
|
static |
Definition at line 628 of file GPUToLLVMConversion.cpp.
References mlir::Value::getDefiningOp().
|
static |
Definition at line 591 of file GPUToLLVMConversion.cpp.
References mlir::Type::isBF16(), mlir::Type::isF16(), mlir::Type::isF32(), mlir::Type::isF64(), and mlir::Type::isInteger().
|
static |
Definition at line 573 of file GPUToLLVMConversion.cpp.
References mlir::Type::isInteger().
|
static |
Definition at line 581 of file GPUToLLVMConversion.cpp.
References mlir::Type::isF16(), and mlir::Type::isInteger().
|
static |
Definition at line 639 of file GPUToLLVMConversion.cpp.
References mlir::Value::getDefiningOp(), and mlir::Operation::print().
Referenced by isSpMMCusparseLtOp().
|
static |
Definition at line 681 of file GPUToLLVMConversion.cpp.
References mlir::RewriterBase::notifyMatchFailure().
|
static |
Definition at line 849 of file GPUToLLVMConversion.cpp.
References mlir::Value::getDefiningOp(), and mlir::Value::getType().
|
static |
Definition at line 814 of file GPUToLLVMConversion.cpp.
References mlir::Value::getType().
|
static |
Definition at line 657 of file GPUToLLVMConversion.cpp.
References mlir::Value::getUsers(), and is2To4Sparsity().