Skip to content

Commit 8d14204

Browse files
authored
Revert "[MLIR][XeGPU] Adding XeGPU 2d block operators (llvm#84692)" (llvm#85653)
This reverts commit daebe5c. This commit causes the following asan issue: ``` <snip>/llvm-project/build/bin/mlir-opt <snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir | <snip>/llvm-project/build/bin/FileCheck <snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir # executed command: <snip>/llvm-project/build/bin/mlir-opt <snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir # .---command stderr------------ # | ================================================================= # | ==2772558==ERROR: AddressSanitizer: stack-use-after-return on address 0x7fd2c2c42b90 at pc 0x55e406d54614 bp 0x7ffc810e4070 sp 0x7ffc810e4068 # | READ of size 8 at 0x7fd2c2c42b90 thread T0 # | #0 0x55e406d54613 in operator()<long int const*> /usr/include/c++/13/bits/predefined_ops.h:318 # | rust-lang#1 0x55e406d54613 in __count_if<long int const*, __gnu_cxx::__ops::_Iter_pred<mlir::verifyListOfOperandsOrIntegers(Operation*, llvm::StringRef, unsigned int, llvm::ArrayRef<long int>, ValueRange)::<lambda(int64_t)> > > /usr/include/c++/13/bits/stl_algobase.h:2125 # | rust-lang#2 0x55e406d54613 in count_if<long int const*, mlir::verifyListOfOperandsOrIntegers(Operation*, ... ```
1 parent ca04b56 commit 8d14204

File tree

8 files changed

+12
-767
lines changed

8 files changed

+12
-767
lines changed

mlir/include/mlir/Dialect/XeGPU/IR/XeGPU.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
#ifndef MLIR_DIALECT_XEGPU_IR_XEGPU_H
1010
#define MLIR_DIALECT_XEGPU_IR_XEGPU_H
1111

12-
#include "mlir/Bytecode/BytecodeOpInterface.h"
13-
#include "mlir/IR/BuiltinTypes.h"
14-
#include "mlir/IR/Dialect.h"
15-
#include "mlir/Interfaces/ShapedOpInterfaces.h"
16-
#include "mlir/Interfaces/SideEffectInterfaces.h"
17-
#include "mlir/Interfaces/ViewLikeInterface.h"
12+
#include <mlir/IR/Dialect.h>
1813

1914
namespace mlir {
2015
namespace xegpu {

mlir/include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td

-61
Original file line numberDiff line numberDiff line change
@@ -10,72 +10,11 @@
1010
#define MLIR_DIALECT_XEGPU_IR_XEGPUATTRS_TD
1111

1212
include "mlir/Dialect/XeGPU/IR/XeGPUDialect.td"
13-
include "mlir/IR/EnumAttr.td"
1413

1514
class XeGPUAttr<string name, string attrMnemonic, list<Trait> traits = [],
1615
string baseCppClass = "::mlir::Attribute">
1716
: AttrDef<XeGPU_Dialect, name, traits, baseCppClass> {
1817
let mnemonic = attrMnemonic;
1918
}
2019

21-
def XeGPU_TensorDescAttr: XeGPUAttr<"TensorDesc", "tdesc_attr"> {
22-
let parameters = (ins
23-
OptionalParameter<"MemoryScopeAttr">: $memory_scope,
24-
OptionalParameter<"IntegerAttr", "1">: $array_length,
25-
OptionalParameter<"BoolAttr", "true">: $boundary_check
26-
);
27-
28-
let builders = [
29-
AttrBuilder<(ins
30-
CArg<"xegpu::MemoryScope", "xegpu::MemoryScope::Global">:$memory_scope,
31-
CArg<"int", "1">:$array_length,
32-
CArg<"bool", "true">: $boundary_check
33-
)>
34-
];
35-
36-
let assemblyFormat = "`<` struct(params) `>`";
37-
}
38-
39-
//===----------------------------------------------------------------------===//
40-
// XeGPU Memory Scope Enums.
41-
//===----------------------------------------------------------------------===//
42-
def XeGPU_MemoryScopeGlobal: I32EnumAttrCase<"Global", 0, "global">;
43-
def XeGPU_MemoryScopeShared: I32EnumAttrCase<"SLM", 1, "slm">;
44-
def XeGPU_MemoryScope: I32EnumAttr<"MemoryScope",
45-
"The address space of the memory the tensor descritor is created for",
46-
[XeGPU_MemoryScopeGlobal, XeGPU_MemoryScopeShared]> {
47-
let genSpecializedAttr = 0;
48-
let cppNamespace = "::mlir::xegpu";
49-
}
50-
51-
def XeGPU_MemoryScopeAttr:
52-
EnumAttr<XeGPU_Dialect, XeGPU_MemoryScope, "memory_scope"> {
53-
let assemblyFormat = "$value";
54-
}
55-
56-
//===----------------------------------------------------------------------===//
57-
// XeGPU Cache Enums.
58-
//===----------------------------------------------------------------------===//
59-
def XeGPU_CachePolicyCached: I32EnumAttrCase<"CACHED", 0, "cached">; // valid for read and write
60-
def XeGPU_CachePolicyUncached: I32EnumAttrCase<"UNCACHED", 1, "uncached">; // valid for read and write
61-
def XeGPU_CachePolicyStreaming: I32EnumAttrCase<"STREAMING", 2, "streaming">; // valid for read only
62-
def XeGPU_CachePolicyInvalid: I32EnumAttrCase<"READ_INVALIDATE", 3, "read_invalidate">; // valid for read only
63-
def XeGPU_CachePolicyWriteBack: I32EnumAttrCase<"WRITE_BACK", 4, "write_back">; // valid for write only
64-
def XeGPU_CachePolicyWriteThrough: I32EnumAttrCase<"WRITE_THROUGH", 5, "write_through">; // valid for write only
65-
66-
def XeGPU_CachePolicyEnums : I32EnumAttr<"CachePolicy", "Cache policy",
67-
[XeGPU_CachePolicyCached, XeGPU_CachePolicyUncached,
68-
XeGPU_CachePolicyStreaming, XeGPU_CachePolicyInvalid,
69-
XeGPU_CachePolicyWriteBack, XeGPU_CachePolicyWriteThrough]> {
70-
let genSpecializedAttr = 0;
71-
let cppNamespace = "::mlir::xegpu";
72-
}
73-
74-
def XeGPU_CacheHintAttr
75-
: EnumAttr<XeGPU_Dialect, XeGPU_CachePolicyEnums, "cache_hint"> {
76-
let assemblyFormat = "`<` $value `>`";
77-
}
78-
79-
80-
8120
#endif // MLIR_DIALECT_XEGPU_IR_XEGPUATTRS_TD

mlir/include/mlir/Dialect/XeGPU/IR/XeGPUDialect.td

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def XeGPU_Dialect : Dialect {
2323
the lower-level GPU compiler.
2424
}];
2525

26-
let useDefaultTypePrinterParser = true;
27-
let useDefaultAttributePrinterParser = true;
26+
// let useDefaultTypePrinterParser = true;
27+
// let useDefaultAttributePrinterParser = true;
2828
}
2929

3030
#endif // MLIR_DIALECT_XEGPU_IR_XEGPUDIALECT_TD

0 commit comments

Comments
 (0)