20 using namespace mlir::amx;
26 struct AMXIntrinsicOpConversion
35 typeConverter(typeConverter) {}
42 op.getIntrinsicOperands(operands, typeConverter, rewriter),
43 typeConverter, rewriter);
54 patterns.add<AMXIntrinsicOpConversion>(converter);
static MLIRContext * getContext(OpFoldResult val)
StringAttr getStringAttr(const Twine &bytes)
This class implements a pattern rewriter for use with ConversionPatterns.
void addIllegalDialect(StringRef name, Names... names)
Register the operations of the given dialects as illegal, i.e.
Derived class that automatically populates legalization information for different LLVM ops.
Conversion from types to the LLVM IR dialect.
MLIRContext & getContext() const
Returns the MLIR context.
OpInterfaceConversionPattern is a wrapper around ConversionPattern that allows for matching and rewri...
This class represents the benefit of a pattern match in a unitless scheme that ranges from 0 (very li...
void addConversion(FnT &&callback)
Register a conversion function.
LogicalResult intrinsicRewrite(Operation *op, StringRef intrinsic, ValueRange operands, const LLVMTypeConverter &typeConverter, RewriterBase &rewriter)
Replaces the given operation "op" with a call to an LLVM intrinsic with the specified name "intrinsic...
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
void populateAMXLegalizeForLLVMExportPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns)
Collect a set of patterns to lower AMX ops to ops that map to LLVM intrinsics.
auto get(MLIRContext *context, Ts &&...params)
Helper method that injects context only if needed, this helps unify some of the attribute constructio...
void configureAMXLegalizeForExportTarget(LLVMConversionTarget &target)
Configure the target to support lowering AMX ops to ops that map to LLVM intrinsics.