1 //===- Transforms.h - AMX Dialect Transformation Entrypoints ----*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef MLIR_DIALECT_AMX_TRANSFORMS_H 10 #define MLIR_DIALECT_AMX_TRANSFORMS_H 11 12 namespace mlir { 13 14 class LLVMConversionTarget; 15 class LLVMTypeConverter; 16 class RewritePatternSet; 17 using OwningRewritePatternList = RewritePatternSet; 18 19 /// Collect a set of patterns to lower AMX ops to ops that map to LLVM 20 /// intrinsics. 21 void populateAMXLegalizeForLLVMExportPatterns(LLVMTypeConverter &converter, 22 RewritePatternSet &patterns); 23 24 /// Configure the target to support lowering AMX ops to ops that map to LLVM 25 /// intrinsics. 26 void configureAMXLegalizeForExportTarget(LLVMConversionTarget &target); 27 28 } // namespace mlir 29 30 #endif // MLIR_DIALECT_AMX_TRANSFORMS_H 31