File tree Expand file tree Collapse file tree 8 files changed +941
-0
lines changed
test/Conversion/XeVMToLLVM Expand file tree Collapse file tree 8 files changed +941
-0
lines changed Original file line number Diff line number Diff line change 80
80
#include " mlir/Conversion/VectorToSCF/VectorToSCF.h"
81
81
#include " mlir/Conversion/VectorToSPIRV/VectorToSPIRVPass.h"
82
82
#include " mlir/Conversion/VectorToXeGPU/VectorToXeGPU.h"
83
+ #include " mlir/Conversion/XeVMToLLVM/XeVMToLLVM.h"
83
84
84
85
namespace mlir {
85
86
Original file line number Diff line number Diff line change @@ -1495,4 +1495,13 @@ def ConvertVectorToXeGPU : Pass<"convert-vector-to-xegpu"> {
1495
1495
];
1496
1496
}
1497
1497
1498
+ //===----------------------------------------------------------------------===//
1499
+ // XeVMToLLVM
1500
+ //===----------------------------------------------------------------------===//
1501
+
1502
+ def ConvertXeVMToLLVMPass : Pass<"convert-xevm-to-llvm"> {
1503
+ let summary = "Convert XeVM to LLVM dialect";
1504
+ let dependentDialects = ["LLVM::LLVMDialect"];
1505
+ }
1506
+
1498
1507
#endif // MLIR_CONVERSION_PASSES
Original file line number Diff line number Diff line change
1
+ // ===-- XeVMToLLVM.h - Convert XeVM to LLVM dialect -------------*- C++ -*-===//
2
+ //
3
+ // This file is licensed 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
+ #ifndef MLIR_CONVERSION_XEVMTOLLVM_XEVMTOLLVMPASS_H_
9
+ #define MLIR_CONVERSION_XEVMTOLLVM_XEVMTOLLVMPASS_H_
10
+
11
+ #include < memory>
12
+
13
+ namespace mlir {
14
+ class DialectRegistry ;
15
+ class LLVMTypeConverter ;
16
+ class RewritePatternSet ;
17
+ class Pass ;
18
+
19
+ #define GEN_PASS_DECL_CONVERTXEVMTOLLVMPASS
20
+ #include " mlir/Conversion/Passes.h.inc"
21
+
22
+ void populateXeVMToLLVMConversionPatterns (RewritePatternSet &patterns);
23
+
24
+ void registerConvertXeVMToLLVMInterface (DialectRegistry ®istry);
25
+ } // namespace mlir
26
+
27
+ #endif // MLIR_CONVERSION_XEVMTOLLVM_XEVMTOLLVMPASS_H_
Original file line number Diff line number Diff line change 32
32
#include " mlir/Conversion/SCFToEmitC/SCFToEmitC.h"
33
33
#include " mlir/Conversion/UBToLLVM/UBToLLVM.h"
34
34
#include " mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
35
+ #include " mlir/Conversion/XeVMToLLVM/XeVMToLLVM.h"
35
36
#include " mlir/Dialect/AMX/Transforms.h"
36
37
#include " mlir/Dialect/Affine/TransformOps/AffineTransformOps.h"
37
38
#include " mlir/Dialect/ArmNeon/TransformOps/ArmNeonVectorTransformOps.h"
@@ -91,6 +92,7 @@ inline void registerAllExtensions(DialectRegistry ®istry) {
91
92
gpu::registerConvertGpuToLLVMInterface (registry);
92
93
NVVM::registerConvertGpuToNVVMInterface (registry);
93
94
vector::registerConvertVectorToLLVMInterface (registry);
95
+ registerConvertXeVMToLLVMInterface (registry);
94
96
95
97
// Register all transform dialect extensions.
96
98
affine::registerTransformDialectExtension (registry);
Original file line number Diff line number Diff line change @@ -73,3 +73,4 @@ add_subdirectory(VectorToLLVM)
73
73
add_subdirectory (VectorToSCF )
74
74
add_subdirectory (VectorToSPIRV )
75
75
add_subdirectory (VectorToXeGPU )
76
+ add_subdirectory (XeVMToLLVM )
Original file line number Diff line number Diff line change
1
+ add_mlir_conversion_library (MLIRXeVMToLLVM
2
+ XeVMToLLVM.cpp
3
+
4
+ ADDITIONAL_HEADER_DIRS
5
+ ${MLIR_MAIN_INCLUDE_DIR} /mlir/Conversion/XeVMToLLVM
6
+
7
+ DEPENDS
8
+ MLIRConversionPassIncGen
9
+
10
+ LINK_COMPONENTS
11
+ Core
12
+
13
+ LINK_LIBS PUBLIC
14
+ MLIRFuncDialect
15
+ MLIRGPUDialect
16
+ MLIRLLVMCommonConversion
17
+ MLIRLLVMDialect
18
+ MLIRXeVMDialect
19
+ MLIRPass
20
+ MLIRTransforms
21
+ )
You can’t perform that action at this time.
0 commit comments