1
- From 34eb42d07af1bd30183c45b24b7663ae9e0470c1 Mon Sep 17 00:00:00 2001
1
+ From 4e5105ef7e07e8ba312bcfbc7d7b7efe93be2523 Mon Sep 17 00:00:00 2001
2
2
From: Garra1980 <
[email protected] >
3
- Date: Wed, 9 Apr 2025 18:26:12 +0200
4
- Subject: [PATCH 1/1 ] xegpu temporary downstream definition changes and vec
3
+ Date: Tue, 22 Jul 2025 22:46:30 +0200
4
+ Subject: [PATCH] xegpu temporary downstream defintion changes and vec
5
5
6
6
---
7
7
mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td | 6 ++++++
@@ -10,18 +10,18 @@ Subject: [PATCH 1/1] xegpu temporary downstream definition changes and vec
10
10
3 files changed, 10 insertions(+), 1 deletion(-)
11
11
12
12
diff --git a/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td b/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
13
- index 16a7f63d60c8..8a518e84570d 100644
13
+ index 81e25f7537cb..a7f3367d3774 100644
14
14
--- a/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
15
15
+++ b/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
16
- @@ -332 ,6 +332 ,7 @@ def XeGPU_LoadNdOp : XeGPU_Op<"load_nd", [
16
+ @@ -345 ,6 +345 ,7 @@ def XeGPU_LoadNdOp : XeGPU_Op<"load_nd", [
17
17
let arguments = (ins XeGPU_TensorDesc: $TensorDesc,
18
18
OptionalAttr<UnitAttr>: $packed,
19
19
OptionalAttr<DenseI64ArrayAttr>: $transpose,
20
20
+ OptionalAttr<I32Attr>: $transpose_bit_width,
21
21
OptionalAttr<XeGPU_CacheHintAttr>: $l1_hint,
22
22
OptionalAttr<XeGPU_CacheHintAttr>: $l2_hint,
23
23
OptionalAttr<XeGPU_CacheHintAttr>: $l3_hint);
24
- @@ -1003 ,4 +1004 ,9 @@ def XeGPU_ConvertLayoutOp: XeGPU_Op<"convert_layout", [Pure, AllTypesMatch<["sou
24
+ @@ -971 ,4 +972 ,9 @@ def XeGPU_ConvertLayoutOp: XeGPU_Op<"convert_layout", [Pure, AllTypesMatch<["sou
25
25
let hasVerifier = 1;
26
26
}
27
27
@@ -32,38 +32,38 @@ index 16a7f63d60c8..8a518e84570d 100644
32
32
+
33
33
#endif // MLIR_DIALECT_XEGPU_IR_XEGPUOPS_TD
34
34
diff --git a/mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp b/mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp
35
- index 0bc0f2fca2c3..87af0060aa5d 100644
35
+ index 80107554144c..b5c013dc5d2d 100644
36
36
--- a/mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp
37
37
+++ b/mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp
38
- @@ -203 ,6 +203 ,7 @@ struct TransferReadLowering : public OpRewritePattern<vector::TransferReadOp> {
38
+ @@ -202 ,6 +202 ,7 @@ struct TransferReadLowering : public OpRewritePattern<vector::TransferReadOp> {
39
39
xegpu::CachePolicyAttr hint = nullptr;
40
- auto loadOp = rewriter.create< xegpu::LoadNdOp>(
41
- loc, vecTy, ndDesc, /*packed=*/nullptr, transposeAttr,
42
- + /*transpose_bit_width*/nullptr,
43
- /*l1_hint=*/hint,
44
- /*l2_hint=*/hint, /*l3_hint=*/hint);
40
+ auto loadOp = xegpu::LoadNdOp::create(rewriter, loc, vecTy, ndDesc,
41
+ /*packed=*/nullptr, transposeAttr,
42
+ + /*transpose_bit_width*/nullptr,
43
+ /*l1_hint=*/hint,
44
+ /*l2_hint=*/hint, /*l3_hint=*/hint);
45
45
rewriter.replaceOp(readOp, loadOp);
46
- @@ -272 ,6 +273 ,7 @@ struct LoadLowering : public OpRewritePattern<vector::LoadOp> {
46
+ @@ -271 ,6 +272 ,7 @@ struct LoadLowering : public OpRewritePattern<vector::LoadOp> {
47
47
xegpu::CachePolicyAttr hint = nullptr;
48
- auto loadNdOp = rewriter.create< xegpu::LoadNdOp> (
49
- loc, vecTy, ndDesc, /*packed=*/nullptr, /*transpose=*/nullptr,
48
+ auto loadNdOp = xegpu::LoadNdOp::create (
49
+ rewriter, loc, vecTy, ndDesc, /*packed=*/nullptr, /*transpose=*/nullptr,
50
50
+ /*transpose_bit_width*/nullptr,
51
51
/*l1_hint=*/hint,
52
52
/*l2_hint=*/hint, /*l3_hint=*/hint);
53
53
rewriter.replaceOp(loadOp, loadNdOp);
54
54
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
55
- index 0d67e3d70f94..873268c2bc10 100644
55
+ index c8da5558438e..a4d1e2c344c1 100644
56
56
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
57
57
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
58
- @@ -70 ,6 +70 ,7 @@ static bool isWriteHintOrNone(const CachePolicyAttr &attr) {
58
+ @@ -65 ,6 +65 ,7 @@ static bool isWriteHintOrNone(const CachePolicyAttr &attr) {
59
59
return true;
60
60
auto kind = attr.getValue();
61
61
return kind == CachePolicy::CACHED || kind == CachePolicy::UNCACHED ||
62
62
+ kind == CachePolicy::STREAMING ||
63
63
kind == CachePolicy::WRITE_BACK || kind == CachePolicy::WRITE_THROUGH;
64
64
}
65
65
66
- @@ -321 ,7 +322 ,7 @@ LogicalResult LoadNdOp::verify() {
66
+ @@ -420 ,7 +421 ,7 @@ LogicalResult LoadNdOp::verify() {
67
67
mlir::emitWarning(getLoc()) << "Invalid transpose attr. It is ignored.";
68
68
}
69
69
0 commit comments