-
Notifications
You must be signed in to change notification settings - Fork 772
[SYCL] Add SYCL registered kernel metadata into property sets #16821
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
steffenlarsen
merged 9 commits into
intel:sycl
from
jzc:sycl-registered-kernels-property
Feb 24, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
85e7d89
[SYCL] Add SYCL registered kernel metadata into property sets
jzc 5a55f91
clang-format
jzc 7ef3e97
Add splitting logic to registered_kernel_names
jzc cdcc204
Address review comments
jzc 4dbf0ee
Add duplicate test
jzc b139b0b
Update llvm/test/tools/sycl-post-link/sycl-registered-kernels-empty.ll
steffenlarsen 1ac9492
Merge remote-tracking branch 'intel/sycl' into sycl-registered-kernel…
jzc e198858
Merge remote-tracking branch 'intel/sycl' into sycl-registered-kernel…
jzc 4a92e35
Merge remote-tracking branch 'intel/sycl' into sycl-registered-kernel…
jzc 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
3 changes: 3 additions & 0 deletions
3
llvm/test/tools/sycl-post-link/sycl-registered-kernels-empty.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,3 @@ | ||
; RUN: sycl-post-link -properties %s -o %t.table | ||
; RUN: FileCheck %s -input-file=%t_0.prop --implicit-check-not="[SYCL/registered kernels]" | ||
!sycl_registered_kernels = !{} |
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,93 @@ | ||
; This test checks that the sycl-post-link ouputs registered kernel data | ||
; from !sycl_registered_kernels metadata into the SYCL/registerd_kernels section. | ||
jzc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
; RUN: sycl-post-link %s -properties -split=auto -o %t.table | ||
; RUN: FileCheck %s -input-file=%t_0.prop --check-prefixes=CHECK-WITH-ASPECT,CHECK \ | ||
; RUN: --implicit-check-not=kernel_with_aspects | ||
; RUN: FileCheck %s -input-file=%t_1.prop --check-prefixes=CHECK-NO-ASPECT,CHECK | ||
|
||
!sycl_registered_kernels = !{!4} | ||
!4 = !{!5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !16, !17, !18, !19} | ||
|
||
; Both splits should contain the registered kernel data. | ||
; CHECK: [SYCL/registered kernels] | ||
|
||
; For each entry in !sycl_registered_kernels, an entry | ||
; mapping the registered name to the mangled name is added in the | ||
; [SYCL/registered kernels] if it references a kernel that appears | ||
; in the split. (Although in the prop files, the | ||
; mapped values are base64 encoded, so just using simplifed check | ||
; with a regex.) | ||
; CHECK-NO-ASPECT-NEXT: foo=2|{{[A-Za-z0-9+/]+}} | ||
!5 = !{!"foo", !"_Z17__sycl_kernel_foov"} | ||
define spir_kernel void @_Z17__sycl_kernel_foov() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: foo3=2|{{[A-Za-z0-9+/]+}} | ||
!6 = !{!"foo3", !"_Z18__sycl_kernel_ff_4v"} | ||
define spir_kernel void @_Z18__sycl_kernel_ff_4v() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: iota=2|{{[A-Za-z0-9+/]+}} | ||
!7 = !{!"iota", !"_Z18__sycl_kernel_iotaiPi"} | ||
define spir_kernel void @_Z18__sycl_kernel_iotaiPi() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: inst temp=2|{{[A-Za-z0-9+/]+}} | ||
!8 = !{!"inst temp", !"_Z22__sycl_kernel_tempfoo2IiEvT_"} | ||
define spir_kernel void @_Z22__sycl_kernel_tempfoo2IiEvT_() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: def spec=2|{{[A-Za-z0-9+/]+}} | ||
!9 = !{!"def spec", !"_Z22__sycl_kernel_tempfoo2IsEvT_"} | ||
define spir_kernel void @_Z22__sycl_kernel_tempfoo2IsEvT_() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: decl temp=2|{{[A-Za-z0-9+/]+}} | ||
!10 = !{!"decl temp", !"_Z21__sycl_kernel_tempfooIiEvT_"} | ||
define spir_kernel void @_Z21__sycl_kernel_tempfooIiEvT_() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: decl spec=2|{{[A-Za-z0-9+/]+}} | ||
!11 = !{!"decl spec", !"_Z22__sycl_kernel_tempfoo2IfEvT_"} | ||
define spir_kernel void @_Z22__sycl_kernel_tempfoo2IfEvT_() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: nontype=2|{{[A-Za-z0-9+/]+}} | ||
!12 = !{!"nontype", !"_Z22__sycl_kernel_tempfoo3ILi5EEvv"} | ||
define spir_kernel void @_Z22__sycl_kernel_tempfoo3ILi5EEvv() { | ||
ret void | ||
} | ||
|
||
; CHECK-NO-ASPECT-NEXT: non-temp=2|{{[A-Za-z0-9+/]+}} | ||
!13 = !{!"decl non-temp", !"_Z17__sycl_kernel_barv"} | ||
define spir_kernel void @_Z17__sycl_kernel_barv() { | ||
ret void | ||
} | ||
|
||
!14 = !{!"kernel_with_aspects", !"kernel_with_aspects"} | ||
!15 = !{i32 1} | ||
; CHECK-WITH-ASPECT-NEXT: kernel_with_aspects=2|{{[A-Za-z0-9+/]+}} | ||
define spir_kernel void @kernel_with_aspects() !sycl_used_aspects !15 { | ||
ret void | ||
} | ||
|
||
; Data with incorrect format should be ignored. | ||
; CHECK-NOT: incorrect_data_format | ||
!16 = !{!"incorrect_data_format"} | ||
|
||
!17 = !{!"bar", !"_Z3barv"} | ||
!18 = !{!"bar", !"_Z3barv"} | ||
!19 = !{!"(void(*)())bar", !"_Z3barv"} | ||
; CHECK-NO-ASPECT-NEXT: bar=2|[[BAR:[A-Za-z0-9+/]+]] | ||
; CHECK-NO-ASPECT-NEXT: (void(*)())bar=2|[[BAR]] | ||
define spir_kernel void @_Z3barv() { | ||
ret void | ||
} |
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.