Commit 8b72aa6
[MLIR][AMDGPU] Fixing word alignment check for bufferload fastpath (llvm#135982)
`delta_bytes % (32 ceilDiv elementBitwidth) != 0` condition is incorrect
in llvm#135014
For example, last load is issued to load only one last element of fp16.
Then `delta bytes = 2`, `(32 ceildiv 16) = 2`. In this case it will be
judged as word aligned. It will send to fast path but get all zeros for
the fp16 because it cross the word boundary.
In reality the equation should be just `delta_bytes % 4` , since a word
is 4 bytes. This PR fix the bug by amending the mod target to 4.1 parent 625a978 commit 8b72aa6
File tree
3 files changed
+10
-17
lines changed- mlir
- lib/Dialect/AMDGPU/Transforms
- test/Dialect/AMDGPU
- utils/bazel/llvm-project-overlay/mlir
3 files changed
+10
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 226 | + | |
232 | 227 | | |
233 | 228 | | |
234 | 229 | | |
235 | 230 | | |
236 | | - | |
| 231 | + | |
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | | - | |
45 | | - | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
123 | | - | |
124 | | - | |
| 121 | + | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
144 | | - | |
| 140 | + | |
145 | 141 | | |
146 | 142 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1559 | 1559 | | |
1560 | 1560 | | |
1561 | 1561 | | |
| 1562 | + | |
1562 | 1563 | | |
1563 | 1564 | | |
1564 | 1565 | | |
| |||
1569 | 1570 | | |
1570 | 1571 | | |
1571 | 1572 | | |
| 1573 | + | |
1572 | 1574 | | |
1573 | 1575 | | |
1574 | 1576 | | |
| |||
0 commit comments