Commit 2dc3c06
authored
[SYCL] Generalize GlobalOffset and enable it for AMDGPU (#5855)
The purpose of this patch is to generalize SYCL global offset pass and enable it for AMDGPU.
* enable global offset in AMD's HIP
* decorate SYCL kernel with dedicated MDNode: This removes the need for command line options added by the SYCL driver, discussed here: [SYCL] Generalize local accessor to shared mem pass #5149 (comment)
* extract common helpers for local accessor and global offset passes
* generalize the pass
* introduce builtin_amdgcn_implicit_offset and enable the pass for ADMGPU
* implement spirv_GlobalOffset_[x,y,z]
* update the docs
The main deviation from the NVPTX is the need for supporting address spaces. For AMD kernel arguments reside in constant address space, which for the case with offset forces a copy to private AS, in order to keep the call-graph interface coherent (we can't allocate const address space for the case without offset).
Corresponding test-suit PR: intel/llvm-test-suite#9411 parent 05fe5ae commit 2dc3c06
45 files changed
Lines changed: 843 additions & 294 deletions
File tree
- clang
- include/clang/Basic
- lib
- CodeGen
- Driver/ToolChains
- test
- CodeGenSYCL
- Driver
- libclc
- amdgcn-amdhsa/libspirv
- workitem
- amdgcn/libspirv
- workitem
- llvm
- docs
- include/llvm
- IR
- SYCLLowerIR
- lib
- SYCLLowerIR
- Target
- AMDGPU
- NVPTX
- test/CodeGen
- AMDGPU
- NVPTX
- sycl
- doc/design
- plugins/hip
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
319 | 324 | | |
320 | 325 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
154 | 174 | | |
155 | 175 | | |
156 | 176 | | |
| |||
7327 | 7347 | | |
7328 | 7348 | | |
7329 | 7349 | | |
7330 | | - | |
7331 | | - | |
7332 | | - | |
7333 | | - | |
7334 | | - | |
7335 | | - | |
7336 | | - | |
7337 | | - | |
7338 | | - | |
7339 | | - | |
7340 | | - | |
7341 | | - | |
| 7350 | + | |
7342 | 7351 | | |
7343 | 7352 | | |
7344 | 7353 | | |
| |||
9308 | 9317 | | |
9309 | 9318 | | |
9310 | 9319 | | |
| 9320 | + | |
| 9321 | + | |
| 9322 | + | |
| 9323 | + | |
| 9324 | + | |
| 9325 | + | |
9311 | 9326 | | |
9312 | 9327 | | |
9313 | 9328 | | |
| |||
9324 | 9339 | | |
9325 | 9340 | | |
9326 | 9341 | | |
| 9342 | + | |
| 9343 | + | |
| 9344 | + | |
| 9345 | + | |
| 9346 | + | |
9327 | 9347 | | |
9328 | 9348 | | |
9329 | 9349 | | |
| |||
9425 | 9445 | | |
9426 | 9446 | | |
9427 | 9447 | | |
9428 | | - | |
9429 | 9448 | | |
9430 | 9449 | | |
9431 | 9450 | | |
| 9451 | + | |
| 9452 | + | |
| 9453 | + | |
| 9454 | + | |
| 9455 | + | |
| 9456 | + | |
9432 | 9457 | | |
9433 | 9458 | | |
9434 | 9459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5842 | 5842 | | |
5843 | 5843 | | |
5844 | 5844 | | |
5845 | | - | |
5846 | | - | |
5847 | | - | |
5848 | | - | |
5849 | | - | |
5850 | | - | |
5851 | 5845 | | |
5852 | 5846 | | |
5853 | 5847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 81 | + | |
| 82 | + | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
This file was deleted.
0 commit comments