File tree 10 files changed +1
-466
lines changed
include/mlir/Dialect/AMDGPU 10 files changed +1
-466
lines changed Original file line number Diff line number Diff line change @@ -29,23 +29,6 @@ def AMDGPU_Dialect : Dialect {
29
29
"gpu::GPUDialect"
30
30
];
31
31
let useDefaultAttributePrinterParser = 1;
32
-
33
- let extraClassDeclaration = [{
34
- /// Return true if the given MemRefType has an integer address
35
- /// space that matches the ROCDL shared memory address space or
36
- /// is a gpu::AddressSpaceAttr attribute with value 'workgroup`.
37
- static bool hasSharedMemoryAddressSpace(MemRefType type);
38
-
39
- /// Return true if the given Attribute has an integer address
40
- /// space that matches the ROCDL shared memory address space or
41
- /// is a gpu::AddressSpaceAttr attribute with value 'workgroup`.
42
- static bool isSharedMemoryAddressSpace(Attribute type);
43
-
44
- /// Defines the MemRef memory space attribute numeric value that indicates
45
- /// a memref is located in shared memory. This should correspond to the
46
- /// value used in ROCDL.
47
- static constexpr unsigned kSharedMemoryAddressSpace = 3;
48
- }];
49
32
}
50
33
51
34
//===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ namespace mlir {
20
20
class ConversionTarget ;
21
21
namespace amdgpu {
22
22
23
- #define GEN_PASS_DECL
24
-
23
+ #define GEN_PASS_DECL_AMDGPUEMULATEATOMICSPASS
25
24
#define GEN_PASS_REGISTRATION
26
25
#include " mlir/Dialect/AMDGPU/Transforms/Passes.h.inc"
27
26
Original file line number Diff line number Diff line change @@ -30,17 +30,4 @@ def AmdgpuEmulateAtomicsPass : Pass<"amdgpu-emulate-atomics"> {
30
30
"Chipset that these operations will run on">];
31
31
}
32
32
33
- def OptimizeSharedMemory : Pass<"amdgpu-optimize-shared-memory"> {
34
- let summary = "Optimizes accesses to shared memory memrefs in order to reduce bank conflicts.";
35
- let description = [{
36
- This pass adds a transformation and pass to the AMDGPU dialect that
37
- attempts to optimize reads/writes from a memref representing GPU shared
38
- memory in order to avoid bank conflicts.
39
- }];
40
-
41
- let dependentDialects = [
42
- "memref::MemRefDialect", "vector::VectorDialect"
43
- ];
44
- }
45
-
46
33
#endif // MLIR_DIALECT_AMDGPU_TRANSFORMS_PASSES_TD_
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -43,21 +43,6 @@ void AMDGPUDialect::initialize() {
43
43
>();
44
44
}
45
45
46
- bool amdgpu::AMDGPUDialect::isSharedMemoryAddressSpace (Attribute memorySpace) {
47
- if (!memorySpace)
48
- return false ;
49
- if (auto intAttr = llvm::dyn_cast<IntegerAttr>(memorySpace))
50
- return intAttr.getInt () == AMDGPUDialect::kSharedMemoryAddressSpace ;
51
- if (auto gpuAttr = llvm::dyn_cast<gpu::AddressSpaceAttr>(memorySpace))
52
- return gpuAttr.getValue () == gpu::AddressSpace::Workgroup;
53
- return false ;
54
- }
55
-
56
- bool amdgpu::AMDGPUDialect::hasSharedMemoryAddressSpace (MemRefType type) {
57
- Attribute memorySpace = type.getMemorySpace ();
58
- return isSharedMemoryAddressSpace (memorySpace);
59
- }
60
-
61
46
// ===----------------------------------------------------------------------===//
62
47
// 8-bit float ops
63
48
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 1
1
add_mlir_dialect_library(MLIRAMDGPUTransforms
2
2
EmulateAtomics.cpp
3
- OptimizeSharedMemory.cpp
4
- Utils.cpp
5
3
6
4
ADDITIONAL_HEADER_DIRS
7
5
{$MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AMDGPU/Transforms
You can’t perform that action at this time.
0 commit comments