Skip to content

Commit a908956

Browse files
committed
Add XeGPUToXeVM load_nd conversions
1 parent 3b6ca2a commit a908956

File tree

10 files changed

+861
-1
lines changed

10 files changed

+861
-1
lines changed

include/gc/Conversion/Passes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
namespace mlir {
1616

17+
#define GEN_PASS_DECL
18+
#include "gc/Conversion/Passes.h.inc"
19+
1720
/// Generate the code for registering conversion passes.
1821
#define GEN_PASS_REGISTRATION
1922
#include "gc/Conversion/Passes.h.inc"

include/gc/Conversion/Passes.td

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,20 @@ def ConvertXeVMToLLVMPass : Pass<"convert-xevm-to-llvm"> {
2222
];
2323
}
2424

25+
//===----------------------------------------------------------------------===//
26+
// XeGPUToXeVM
27+
//===----------------------------------------------------------------------===//
28+
29+
def ConvertXeGPUToXeVMPass : Pass<"convert-xegpu-to-xevm"> {
30+
let summary = "Convert XeGPU to XeVM dialect";
31+
let dependentDialects = [
32+
"xegpu::XeGPUDialect",
33+
"xevm::XeVMDialect",
34+
"vector::VectorDialect",
35+
"memref::MemRefDialect",
36+
"arith::ArithDialect",
37+
];
38+
}
39+
40+
2541
#endif // GC_CONVERSION_PASSES
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//===-- XeGPUToXeVM.h - Convert XeVM to LLVM dialect -------------*- C++
2+
//-*-===//
3+
//
4+
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
5+
// See https://llvm.org/LICENSE.txt for license information.
6+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
//
8+
//===----------------------------------------------------------------------===//
9+
#ifndef MLIR_CONVERSION_XEGPUTOXEVM_XEGPUTOXEVMPASS_H_
10+
#define MLIR_CONVERSION_XEGPUTOXEVM_XEGPUTOXEVMPASS_H_
11+
12+
#include <memory>
13+
14+
namespace mlir {
15+
class DialectRegistry;
16+
class LLVMTypeConverter;
17+
class RewritePatternSet;
18+
class Pass;
19+
20+
#define GEN_PASS_DECL_CONVERTXEGPUTOXEVMPASS
21+
#include "gc/Conversion/Passes.h.inc"
22+
23+
void populateXeGPUToXeVMConversionPatterns(RewritePatternSet &patterns,
24+
LLVMTypeConverter &typeConverter);
25+
26+
} // namespace mlir
27+
28+
#endif // MLIR_CONVERSION_XEGPUTOXEVM_XEGPUTOXEVMPASS_H_

lib/gc/Conversion/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
add_subdirectory(XeVMToLLVM)
2+
add_subdirectory(XeGPUToXeVM)

0 commit comments

Comments
 (0)