-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[SPIRV] Enable OpenCL max_work_group_size translation via SPV_INTEL_kernel_attributes
#165891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3e0abe1
Add pass which forwards unimplemented math builtins / libcalls to the…
AlexVlx 6ac96c6
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 92749f7
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 2d9a794
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 0e331b5
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx f97d25d
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 2d43a92
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 1ead36f
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx f74c828
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 83dbc0d
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 4255cdd
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx de81a63
Merge branch 'main' of https://github.com/llvm/llvm-project
AlexVlx 95f6005
Add support for `SPV_INTEL_kernel_attributes`.
AlexVlx b219e29
Merge branch 'main' of https://github.com/llvm/llvm-project into spir…
AlexVlx f91b71f
Fix formatting.
AlexVlx 7dcd767
Remove unrelated change.
AlexVlx 7777346
Add relevant docs entry.
AlexVlx d2a9174
Replace as of yet unimplemented bits with corresponding TODOs.
AlexVlx a441ca6
Merge branch 'main' into spirv_be_staging_1
AlexVlx 465b9cd
Merge branch 'main' into spirv_be_staging_1
AlexVlx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_kernel_attributes/max_work_group_size.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_INTEL_kernel_attributes %s -o - | FileCheck %s | ||
| ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-amd-amdhsa %s -o - | FileCheck %s | ||
| ; %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_INTEL_kernel_attributes %s -o - -filetype=obj | spirv-val %} | ||
| ; %if spirv-tools %{ llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - -filetype=obj | spirv-val %} | ||
|
|
||
| ; CHECK: OpCapability KernelAttributesINTEL | ||
| ; CHECK: OpExtension "SPV_INTEL_kernel_attributes" | ||
| ; CHECK: OpEntryPoint {{.*}} %[[DIM1:[0-9]+]] "Dim1" | ||
| ; CHECK: OpEntryPoint {{.*}} %[[DIM2:[0-9]+]] "Dim2" | ||
| ; CHECK: OpEntryPoint {{.*}} %[[DIM3:[0-9]+]] "Dim3" | ||
| ; CHECK: OpExecutionMode %[[DIM1]] MaxWorkgroupSizeINTEL 4 1 1 | ||
| ; CHECK: OpExecutionMode %[[DIM2]] MaxWorkgroupSizeINTEL 8 4 1 | ||
| ; CHECK: OpExecutionMode %[[DIM3]] MaxWorkgroupSizeINTEL 16 8 4 | ||
| ; CHECK: %[[DIM1]] = OpFunction | ||
| ; CHECK: %[[DIM2]] = OpFunction | ||
| ; CHECK: %[[DIM3]] = OpFunction | ||
|
|
||
| define spir_kernel void @Dim1() !max_work_group_size !0 { | ||
| ret void | ||
| } | ||
|
|
||
| define spir_kernel void @Dim2() !max_work_group_size !1 { | ||
| ret void | ||
| } | ||
|
|
||
| define spir_kernel void @Dim3() !max_work_group_size !2 { | ||
| ret void | ||
| } | ||
|
|
||
| !0 = !{i32 4} | ||
| !1 = !{i32 8, i32 4} | ||
| !2 = !{i32 16, i32 8, i32 4} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.