14 #ifndef MLIR_DIALECT_GPU_GPUDIALECT_H 15 #define MLIR_DIALECT_GPU_GPUDIALECT_H 50 Type elementType, StringRef operand)
51 : dimShapes(dimShapes), numDims(numDims), elementType(elementType),
55 using KeyTy = std::tuple<ArrayRef<int64_t>,
Type, StringRef>;
64 StringRef operand = allocator.
copyInto(std::get<2>(key));
123 :
public Type::TypeBase<MMAMatrixType, Type, MMAMatrixStorageType> {
138 static bool isValidElementType(
Type elementType);
147 unsigned getNumDims()
const;
158 StringRef getOperand()
const;
167 #include "mlir/Dialect/GPU/GPUOpsEnums.h.inc" 169 #include "mlir/Dialect/GPU/GPUOpsDialect.h.inc" 171 #include "mlir/Dialect/GPU/GPUOpInterfaces.h.inc" 173 #define GET_ATTRDEF_CLASSES 174 #include "mlir/Dialect/GPU/GPUOpsAttributes.h.inc" 176 #define GET_OP_CLASSES 177 #include "mlir/Dialect/GPU/GPUOps.h.inc" 179 #endif // MLIR_DIALECT_GPU_GPUDIALECT_H Include the generated interface declarations.
ArrayRef< int64_t > getShape() const
Operation is a basic unit of execution within MLIR.
unsigned numDims
Number of dimensions in the MMA matrix.
void addAsyncDependency(Operation *op, Value token)
MMAMatrix represents a matrix held by a subgroup for matrix-matrix multiply accumulate operations...
This class represents a diagnostic that is inflight and set to be reported.
Base storage class appearing in a Type.
This is a utility allocator used to allocate memory for instances of derived types.
static Type getElementType(Type type, ArrayRef< int32_t > indices, function_ref< InFlightDiagnostic(StringRef)> emitErrorFn)
Walks the given type hierarchy with the given indices, potentially down to component granularity...
static ArrayRef< int64_t > getShape(Type type)
Returns the shape of the given type.
std::tuple< ArrayRef< int64_t >, Type, StringRef > KeyTy
The hash key for uniquing.
Type elementType
Element type of elements held in the MMA matrix.
StringRef operand
MMA operand that this MMAMatrix holds.
T * allocate()
Allocate an instance of the provided type.
This class represents an efficient way to signal success or failure.
bool operator==(const KeyTy &key) const
StringRef getOperand() const
MMAMatrixStorageType(unsigned numDims, const int64_t *dimShapes, Type elementType, StringRef operand)
Utility class for the GPU dialect to represent triples of Values accessible through ...
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
static MMAMatrixStorageType * construct(TypeStorageAllocator &allocator, const KeyTy &key)
Construction.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
MMAMatrixType storage and uniquing.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
Utility class for implementing users of storage classes uniqued by a StorageUniquer.
const int64_t * dimShapes
Reference to the shape of the MMA matrix.
LogicalResult verify(Operation *op, bool verifyRecursively=true)
Perform (potentially expensive) checks of invariants, used to detect compiler bugs, on this operation and any nested operations.
ArrayRef< T > copyInto(ArrayRef< T > elements)
Copy the specified array of elements into memory managed by our bump pointer allocator.