|
MLIR
22.0.0git
|
#include "mlir/Dialect/AMX/AMXDialect.h"#include "mlir/Conversion/LLVMCommon/Pattern.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/Dialect/LLVMIR/LLVMTypes.h"#include "mlir/IR/Builders.h"#include "mlir/IR/DialectImplementation.h"#include "mlir/IR/OpImplementation.h"#include "mlir/IR/TypeUtilities.h"#include "llvm/ADT/TypeSwitch.h"#include "mlir/Dialect/AMX/AMXInterfaces.cpp.inc"#include "mlir/Dialect/AMX/AMXDialect.cpp.inc"#include "mlir/Dialect/AMX/AMXTypes.cpp.inc"#include "mlir/Dialect/AMX/AMX.cpp.inc"Go to the source code of this file.
Macros | |
| #define | GET_TYPEDEF_LIST |
| #define | GET_OP_LIST |
| #define | GET_OP_CLASSES |
| #define | GET_TYPEDEF_CLASSES |
Functions | |
| static LogicalResult | verifyTileSize (Operation *op, amx::TileType tp) |
| Verify that AMX supports the implied tile shape. More... | |
| static LogicalResult | verifyMultShape (Operation *op, amx::TileType atp, amx::TileType btp, amx::TileType ctp, unsigned scale) |
| Verify that AMX supports the multiplication. More... | |
| static SmallVector< Value > | getTileSizes (Location loc, amx::TileType tType, RewriterBase &rewriter) |
| Maps the 2-dim vector shape to the two 16-bit tile sizes. More... | |
| static Value | computeStrideInBytes (Location loc, MemRefType mType, Value elementStride, RewriterBase &rewriter) |
Returns stride expressed in number of bytes for the given elementStride stride encoded in number of elements of the type mType. More... | |
| static Value | inferStride (Location loc, MemRefType mType, Value base, RewriterBase &rewriter) |
| Maps the 2-dim memref shape to the 64-bit stride. More... | |
| template<typename OpTy , typename = std::enable_if_t<std::is_same_v<OpTy, amx::TileLoadOp> || std::is_same_v<OpTy, amx::TileStoreOp>>> | |
| static LogicalResult | tileTransferVerifier (OpTy op) |
| #define GET_OP_CLASSES |
Definition at line 314 of file AMXDialect.cpp.
| #define GET_OP_LIST |
| #define GET_TYPEDEF_CLASSES |
Definition at line 317 of file AMXDialect.cpp.
| #define GET_TYPEDEF_LIST |
|
static |
Returns stride expressed in number of bytes for the given elementStride stride encoded in number of elements of the type mType.
Definition at line 85 of file AMXDialect.cpp.
References mlir::Builder::getI64IntegerAttr(), and mlir::Builder::getIntegerType().
Referenced by inferStride().
|
static |
Maps the 2-dim vector shape to the two 16-bit tile sizes.
The first dimension directly translates into the number of rows of the tiles. The second dimensions needs to be scaled by the number of bytes.
Definition at line 70 of file AMXDialect.cpp.
References mlir::Builder::getI16IntegerAttr(), and mlir::Builder::getIntegerType().
|
static |
Maps the 2-dim memref shape to the 64-bit stride.
Note that the buffer shape may "envelop" the actual tile shape, and may be dynamically sized.
Definition at line 97 of file AMXDialect.cpp.
References computeStrideInBytes(), mlir::Builder::getI64IntegerAttr(), mlir::Builder::getIntegerType(), and mlir::MemRefDescriptor::stride().
|
static |
Definition at line 132 of file AMXDialect.cpp.
References mlir::remark::failed(), and verifyTileSize().
|
static |
Verify that AMX supports the multiplication.
Definition at line 55 of file AMXDialect.cpp.
References mlir::Operation::emitOpError().
|
static |
Verify that AMX supports the implied tile shape.
Definition at line 43 of file AMXDialect.cpp.
References mlir::Operation::emitOpError().
Referenced by tileTransferVerifier().