|
MLIR 24.0.0git
|
#include "mlir/Dialect/LLVMIR/NVVMMmaOps.h"#include "IR/NVVMOps.h"#include "mlir/IR/Builders.h"#include "mlir/IR/BuiltinTypes.h"#include "mlir/IR/Diagnostics.h"#include "mlir/IR/MLIRContext.h"#include "mlir/IR/Operation.h"#include "mlir/IR/OperationSupport.h"#include "mlir/IR/PatternMatch.h"#include "mlir/IR/Types.h"#include "mlir/Target/LLVMIR/ModuleTranslation.h"#include "llvm/ADT/STLExtras.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/IntrinsicsNVPTX.h"#include "llvm/Support/Casting.h"#include "llvm/Support/raw_ostream.h"#include <array>#include <cassert>#include <optional>#include <string>#include <utility>#include "mlir/Dialect/LLVMIR/NVVMMmaOps.cpp.inc"Go to the source code of this file.
Macros | |
| #define | GET_OP_CLASSES |
Functions | |
| template<typename AttrTy> | |
| static ParseResult | parseEnumKeyword (OpAsmParser &parser, AttrTy &attr) |
| static bool | isInt4PtxType (MMATypes type) |
| static bool | isInt8PtxType (MMATypes type) |
| static bool | isIntegerPtxType (MMATypes type) |
| template<typename AttrTy> | |
| static void | printMmaProperty (OpAsmPrinter &printer, bool &isFirst, StringRef keyword, AttrTy value) |
| template<typename AttrTy> | |
| static void | printMmaEnumProperty (OpAsmPrinter &printer, bool &isFirst, StringRef keyword, AttrTy value) |
| static void | printMmaUnitProperty (OpAsmPrinter &printer, bool &isFirst, StringRef keyword) |
| template<typename AttrTy> | |
| static ParseResult | parseMmaPropertyValue (OpAsmParser &parser, NamedAttrList &attributes, StringRef name) |
| template<typename AttrTy> | |
| static ParseResult | parseMmaEnumPropertyValue (OpAsmParser &parser, NamedAttrList &attributes, StringRef name) |
| static bool | isMmaPropertyName (StringRef name) |
| static ParseResult | parseMmaProperties (OpAsmParser &parser, NamedAttrList &attributes, ArrayRef< StringRef > allowedKeywords, ArrayRef< StringRef > requiredProperties) |
| static void | printOperandList (OpAsmPrinter &p, StringRef name, ArrayRef< Value > operands) |
| static LogicalResult | parseMmaOperand (OpAsmParser &parser, StringRef operandName, SmallVectorImpl< OpAsmParser::UnresolvedOperand > ®s) |
| template<typename Op> | |
| static void | processOperandFragments (Op &op, std::array< MMAOperandFragment, 3 > &frags, SmallVectorImpl< Type > ®Types, SmallVectorImpl< StringRef > &ignoreAttrNames) |
| static LogicalResult | parseMmaTypeSignature (OpAsmParser &parser, SmallVectorImpl< Type > &operandTypes) |
| static void | inferAndSetMultiplicandTypes (MLIRContext *ctx, NamedAttrList &attrs, const SmallVectorImpl< Type > &operandTypes) |
| template<typename OpType> | |
| static void | addBlockScaleProperties (OpBuilder &builder, OperationState &result, ArrayRef< int64_t > shape, ScaleVecSize scaleVecSize, BlockScaleFormat blockScaleFormat, MMABlockScaleKind kind) |
| static void | addInferredMultiplicandTypes (MLIRContext *ctx, OperationState &result, ValueRange operandA, ValueRange operandB, std::optional< std::array< MMATypes, 2 > > multiplicandPtxTypes) |
| template<typename OpTy> | |
| static MMATypes | inferPtxTypeFromResult (OpTy op) |
| static std::pair< mlir::Type, unsigned > | inferMMATypeFromMNK (NVVM::MMATypes type, NVVM::MMAFrag frag, int m, int n, int k, MLIRContext *context) |
| #define GET_OP_CLASSES |
Definition at line 2191 of file NVVMMmaOps.cpp.
|
static |
Definition at line 1329 of file NVVMMmaOps.cpp.
References mlir::Builder::getAttr(), mlir::Builder::getContext(), and result.
|
static |
Definition at line 1345 of file NVVMMmaOps.cpp.
References mlir::getType(), and result.
|
static |
Definition at line 1311 of file NVVMMmaOps.cpp.
References mlir::NamedAttrList::get(), and mlir::NamedAttrList::set().
|
static |
Definition at line 1971 of file NVVMMmaOps.cpp.
References mlir::NVVM::inferMMAType().
|
static |
Definition at line 1364 of file NVVMMmaOps.cpp.
|
static |
Definition at line 94 of file NVVMMmaOps.cpp.
Referenced by isIntegerPtxType().
|
static |
Definition at line 98 of file NVVMMmaOps.cpp.
Referenced by isIntegerPtxType().
|
static |
Definition at line 102 of file NVVMMmaOps.cpp.
References isInt4PtxType(), and isInt8PtxType().
|
static |
Definition at line 171 of file NVVMMmaOps.cpp.
Referenced by parseMmaProperties().
|
static |
Definition at line 45 of file NVVMMmaOps.cpp.
References mlir::AsmParser::emitError(), mlir::AsmParser::getContext(), mlir::AsmParser::getCurrentLocation(), mlir::AsmParser::parseKeywordOrString(), and success().
Referenced by parseMmaEnumPropertyValue().
|
static |
Definition at line 158 of file NVVMMmaOps.cpp.
References mlir::NamedAttrList::append(), mlir::AsmParser::emitError(), mlir::NamedAttrList::get(), mlir::AsmParser::getCurrentLocation(), parseEnumKeyword(), mlir::AsmParser::parseEqual(), and success().
Referenced by parseMmaProperties().
|
static |
Definition at line 1246 of file NVVMMmaOps.cpp.
References mlir::AsmParser::OptionalSquare, mlir::AsmParser::parseKeyword(), mlir::OpAsmParser::parseOperandList(), and success().
|
static |
Definition at line 180 of file NVVMMmaOps.cpp.
References mlir::NamedAttrList::append(), mlir::AsmParser::emitError(), mlir::NamedAttrList::get(), mlir::AsmParser::getBuilder(), mlir::AsmParser::getCurrentLocation(), mlir::Builder::getUnitAttr(), isMmaPropertyName(), mlir::AsmParser::parseKeyword(), parseMmaEnumPropertyValue(), parseMmaPropertyValue(), mlir::AsmParser::parseOptionalAttrDict(), mlir::AsmParser::parseOptionalComma(), and success().
|
static |
Definition at line 144 of file NVVMMmaOps.cpp.
References mlir::NamedAttrList::append(), mlir::AsmParser::emitError(), mlir::NamedAttrList::get(), mlir::AsmParser::getCurrentLocation(), mlir::AsmParser::parseCustomAttributeWithFallback(), mlir::AsmParser::parseEqual(), and success().
Referenced by parseMmaProperties().
|
static |
Definition at line 1287 of file NVVMMmaOps.cpp.
References mlir::AsmParser::emitError(), mlir::AsmParser::getCurrentLocation(), mlir::AsmParser::parseColon(), mlir::AsmParser::parseCommaSeparatedList(), mlir::AsmParser::parseLParen(), mlir::AsmParser::parseRParen(), mlir::AsmParser::parseType(), and success().
|
static |
Definition at line 130 of file NVVMMmaOps.cpp.
|
static |
Definition at line 122 of file NVVMMmaOps.cpp.
References mlir::AsmPrinter::printStrippedAttrOrType().
|
static |
Definition at line 137 of file NVVMMmaOps.cpp.
|
static |
Definition at line 1237 of file NVVMMmaOps.cpp.
References mlir::OpAsmPrinter::printOperands().
|
static |
Definition at line 1260 of file NVVMMmaOps.cpp.