13#ifndef MLIR_DIALECT_NVGPU_UTILS_MMAUTILS_H
14#define MLIR_DIALECT_NVGPU_UTILS_MMAUTILS_H
52struct FragmentElementInfo {
53 Type registerLLVMType;
56 int64_t numRegistersPerFragment;
61FailureOr<FragmentElementInfo>
62getMmaSyncRegisterType(
const WarpMatrixInfo &type);
73 const WarpMatrixInfo &fragmentType);
77struct LdMatrixParams {
78 VectorType fragmentType;
81 vector::IteratorType contiguousDimType;
82 NVVM::MMALayout targetLayout;
87FailureOr<LdMatrixParams> getLdMatrixParams(
const WarpMatrixInfo &type,
93getLaneIdToLdMatrixMatrixCoord(OpBuilder &builder, Location loc,
94 const LdMatrixParams ¶ms);
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
Operation is the basic unit of execution within MLIR.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
FailureOr< vector::ContractionOp > getUserContract(Operation *op)
Returns the first user of the op that is vector.contract.
FailureOr< WarpMatrixInfo > getWarpMatrixInfo(Operation *op)
If op is a vector.transfer_write, return the WarpMatrixInfo for the vector operand.
bool canLowerToWarpMatrixOperation(vector::TransferWriteOp op)
Returns the number of bits in a single tile row.
MatMulOperandRole
Represents the role of an operand in an MMA instruction: result := matmul(A, B) + C
Include the generated interface declarations.
Collects information about a warp-level matrix operand represented by a VectorType.
MatMulOperandRole operandRole