InsertGPUAlloc pass fails when it encounters memref.get_global
- Dominant language
- MLIR
- Stars
- 156
- Forks
- 45
- Avg merge
- 4h 14m
- Merged PRs (30d)
- 22
Description
```
%39 = memref.get_global @__constant_500xf64 : memref<500xf64>
%40 = memref.alloc() : memref<500xf64>
memref.dealloc %40 : memref<500xf64>
%41 = memref.alloc() : memref<500xf64>
%c1_20 = arith.constant 1 : index
%c500_21 = arith.constant 500 : index
gpu.launch blocks(%arg2, %arg3, %arg4) in (%arg8 = %c500_21, %arg9 = %c1_20, %arg10 = %c1_20) threads(%arg5, %arg6, %arg7) in (%arg11 = %c1_20, %arg12 = %c1_20, %arg13 = %c1_20) {
%60 = arith.muli %arg2, %c1 : index
%61 = arith.addi %60, %c0 : index
%62 = memref.load %38[%61] : memref<500xf64>
%63 = memref.load %39[%61] : memref<500xf64>```
The issue hits in line %63 = memref.load %39[%61] : memref<500xf64> ...when memref.load accesses an memref.get_global to load.
This needs to be handled in the InsertGPUAlloc Pass where its assumed that all such aliases will be a memref::allocOP
Contributor guide
Assessment
This issue has not been assessed yet.