14 #ifndef MLIR_DIALECT_GPU_IR_GPUDIALECT_H
15 #define MLIR_DIALECT_GPU_IR_GPUDIALECT_H
30 #include "llvm/ADT/STLExtras.h"
59 using KeyTy = std::tuple<ArrayRef<int64_t>,
Type, StringRef>;
127 :
public Type::TypeBase<MMAMatrixType, Type, MMAMatrixStorageType> {
171 template <SparseHandleKind K>
187 #include "mlir/Dialect/GPU/IR/GPUOpsEnums.h.inc"
189 #include "mlir/Dialect/GPU/IR/GPUOpsDialect.h.inc"
191 #include "mlir/Dialect/GPU/IR/GPUOpInterfaces.h.inc"
195 #define GET_ATTRDEF_CLASSES
196 #include "mlir/Dialect/GPU/IR/GPUOpsAttributes.h.inc"
198 #define GET_OP_CLASSES
199 #include "mlir/Dialect/GPU/IR/GPUOps.h.inc"
This class represents a diagnostic that is inflight and set to be reported.
Operation is the basic unit of execution within MLIR.
This is a utility allocator used to allocate memory for instances of derived types.
ArrayRef< T > copyInto(ArrayRef< T > elements)
Copy the specified array of elements into memory managed by our bump pointer allocator.
T * allocate()
Allocate an instance of the provided type.
Base storage class appearing in a Type.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Utility class for implementing users of storage classes uniqued by a StorageUniquer.
MMAMatrix represents a matrix held by a subgroup for matrix-matrix multiply accumulate operations.
ArrayRef< int64_t > getShape() const
Get shape of the matrix.
static MMAMatrixType get(ArrayRef< int64_t > shape, Type elementType, StringRef operand)
Get MMAMatrixType and verify construction Invariants.
Type getElementType() const
Get elementType of a single element.
static bool isValidElementType(Type elementType)
Check if a type is valid a MMAMatrixType elementType.
StringRef getOperand() const
The general form of operation this type supports is given by the equation C += A*B.
static MMAMatrixType getChecked(function_ref< InFlightDiagnostic()> emitError, ArrayRef< int64_t > shape, Type elementType, StringRef operand)
Get MMAMatrixType at a particular location and verify construction Invariants.
static LogicalResult verify(function_ref< InFlightDiagnostic()> emitError, ArrayRef< int64_t > shape, Type elementType, StringRef operand)
Verify that shape and elementType are actually allowed for the MMAMatrixType.
unsigned getNumDims() const
Get number of dims.
typename Type::TypeBase< SparseHandleType< K >, Type, TypeStorage >::Base Base
void addAsyncDependency(Operation *op, Value token)
This header declares functions that assist transformations in the MemRef dialect.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
This class represents an efficient way to signal success or failure.
Utility class for the GPU dialect to represent triples of Values accessible through ....
MMAMatrixType storage and uniquing.
StringRef operand
MMA operand that this MMAMatrix holds.
ArrayRef< int64_t > getShape() const
static MMAMatrixStorageType * construct(TypeStorageAllocator &allocator, const KeyTy &key)
Construction.
unsigned numDims
Number of dimensions in the MMA matrix.
const int64_t * dimShapes
Reference to the shape of the MMA matrix.
StringRef getOperand() const
MMAMatrixStorageType(unsigned numDims, const int64_t *dimShapes, Type elementType, StringRef operand)
Type elementType
Element type of elements held in the MMA matrix.
std::tuple< ArrayRef< int64_t >, Type, StringRef > KeyTy
The hash key for uniquing.
bool operator==(const KeyTy &key) const