#include "mlir/Dialect/LLVMIR/NVVMDialect.h"
#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
#include "mlir/Dialect/GPU/IR/CompilationInterfaces.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/Types.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <optional>
#include <string>
#include "mlir/Dialect/LLVMIR/NVVMOpsDialect.cpp.inc"
#include "mlir/Dialect/LLVMIR/NVVMOpsEnums.cpp.inc"
#include "mlir/Dialect/LLVMIR/NVVMOps.cpp.inc"
#include "mlir/Dialect/LLVMIR/NVVMOpsAttributes.cpp.inc"
Go to the source code of this file.
|
static void | printNVVMIntrinsicOp (OpAsmPrinter &p, Operation *op) |
|
static LogicalResult | CpAsyncBulkTensorCommonVerifier (size_t tensorDims, bool isIm2Col, size_t numIm2ColOffsets, Location loc) |
|
static bool | isInt4PtxType (MMATypes type) |
|
static bool | isInt8PtxType (MMATypes type) |
|
static bool | isIntegerPtxType (MMATypes type) |
|
static std::pair< mlir::Type, unsigned > | inferMMATypeFromMNK (NVVM::MMATypes type, NVVM::MMAFrag frag, int m, int n, int k, MLIRContext *context) |
|
FailureOr< int > | getAllowedSizeK (NVVM::WGMMATypes typeA) |
|
LogicalResult | isAllowedWGMMADataType (NVVM::WGMMATypes typeD, NVVM::WGMMATypes typeA, NVVM::WGMMATypes typeB) |
|
LogicalResult | isAllowedSizeN (int sizeN, NVVM::WGMMATypes typeA) |
|
◆ CP_ASYNC_BULK_TENSOR_REDUCE
#define CP_ASYNC_BULK_TENSOR_REDUCE |
( |
|
op, |
|
|
|
dim, |
|
|
|
is_im2col |
|
) |
| |
Value:
#define CP_ASYNC_BULK_TENSOR_REDUCE_MODE(op, dim, mode)
SmallVector< SmallVector< AffineForOp, 8 >, 8 > tile(ArrayRef< AffineForOp > forOps, ArrayRef< uint64_t > sizes, ArrayRef< AffineForOp > targets)
Performs tiling fo imperfectly nested loops (with interchange) by strip-mining the forOps by sizes an...
Definition at line 1115 of file NVVMDialect.cpp.
◆ CP_ASYNC_BULK_TENSOR_REDUCE_MODE
#define CP_ASYNC_BULK_TENSOR_REDUCE_MODE |
( |
|
op, |
|
|
|
dim, |
|
|
|
mode |
|
) |
| llvm::Intrinsic::nvvm_cp_async_bulk_tensor_##op##_##mode##_##dim##d |
◆ GET_ATTRDEF_CLASSES
#define GET_ATTRDEF_CLASSES |
◆ GET_ATTRDEF_LIST
◆ GET_CP_ASYNC_BULK_TENSOR_ID
#define GET_CP_ASYNC_BULK_TENSOR_ID |
( |
|
op, |
|
|
|
dims, |
|
|
|
is_im2col |
|
) |
| |
Value: [&]() -> auto { \
switch (dims) { \
case 1: \
case 2: \
case 3: \
case 4: \
case 5: \
default: \
llvm_unreachable("Invalid TensorDim in CpAsyncBulkTensorReduceOp."); \
} \
}()
#define CP_ASYNC_BULK_TENSOR_REDUCE(op, dim, is_im2col)
Definition at line 1119 of file NVVMDialect.cpp.
◆ GET_OP_CLASSES
◆ GET_OP_LIST
◆ CpAsyncBulkTensorCommonVerifier()
static LogicalResult CpAsyncBulkTensorCommonVerifier |
( |
size_t |
tensorDims, |
|
|
bool |
isIm2Col, |
|
|
size_t |
numIm2ColOffsets, |
|
|
Location |
loc |
|
) |
| |
|
static |
◆ getAllowedSizeK()
FailureOr<int> getAllowedSizeK |
( |
NVVM::WGMMATypes |
typeA | ) |
|
◆ inferMMATypeFromMNK()
static std::pair<mlir::Type, unsigned> inferMMATypeFromMNK |
( |
NVVM::MMATypes |
type, |
|
|
NVVM::MMAFrag |
frag, |
|
|
int |
m, |
|
|
int |
n, |
|
|
int |
k, |
|
|
MLIRContext * |
context |
|
) |
| |
|
static |
◆ isAllowedSizeN()
LogicalResult isAllowedSizeN |
( |
int |
sizeN, |
|
|
NVVM::WGMMATypes |
typeA |
|
) |
| |
◆ isAllowedWGMMADataType()
LogicalResult isAllowedWGMMADataType |
( |
NVVM::WGMMATypes |
typeD, |
|
|
NVVM::WGMMATypes |
typeA, |
|
|
NVVM::WGMMATypes |
typeB |
|
) |
| |
◆ isInt4PtxType()
static bool isInt4PtxType |
( |
MMATypes |
type | ) |
|
|
static |
◆ isInt8PtxType()
static bool isInt8PtxType |
( |
MMATypes |
type | ) |
|
|
static |
◆ isIntegerPtxType()
static bool isIntegerPtxType |
( |
MMATypes |
type | ) |
|
|
static |
◆ printNVVMIntrinsicOp()