-
Notifications
You must be signed in to change notification settings - Fork 744
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
[SYCL] Fix handling of multiple usages of composite spec constants #2894
[SYCL] Fix handling of multiple usages of composite spec constants #2894
Conversation
Fixed the issue that instead of re-using previously assigned IDs for elements of a composite spec constant, all elements used the same ID, which was taken from the last element of the composite.
sycl/test/on-device/spec_const/multiple-usages-of-composite.cpp
Outdated
Show resolved
Hide resolved
sycl/test/on-device/spec_const/multiple-usages-of-composite.cpp
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,1450 @@ | |||
; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o - \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to reduce this test to leave the bare minimum required to verify that the fix makes the SpecConstants pass behave as expected. The test does not need to be complete real-life test - the latter already exists in .cpp form, which should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified the test in 7de5a3a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks much better now. Nit: @llvm.lifetime.start.p0i8
could be removed as well
sycl/test/on-device/spec_const/multiple-usages-of-composite.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,1450 @@ | |||
; RUN: sycl-post-link -spec-const=rt --ir-output-only %s -S -o - \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks much better now. Nit: @llvm.lifetime.start.p0i8
could be removed as well
* upstream/sycl: (616 commits) [SYCL][L0] Implement robust error handling in level_zero plugin (intel#2870) [SYCL][NFC] Code clean up (phase 5) revealed by self build. (intel#2907) [Driver][NFC] Remove unused variable (intel#2908) [Github Action] Enable automatic sync for main branch from llvm-project to llvm (intel#2904) [ESIMD][NFC] Remove unnecessary macro checks (intel#2900) [SYCL] Fix handling of multiple usages of composite spec constants (intel#2894) [SYCL] Adjust parallel-for range global size to improve group size selection (intel#2703) [SYCL] Add template parameter support for no_global_work_offset attribute (intel#2839) [SYCL] Support LLVM FP intrinsic in llvm-spirv and FE (intel#2880) [SYCL]Link Libm FP64 SYCL device library by default (intel#2892) [SYCL][NFC] Code clean up (phase 4) revealed by self build. (intel#2878) [SYCL][NFC] Code clean up (phase 3) revealed by self build. (intel#2865) [SYCL] Fix backend selection for SYCL_DEVICE_TYPE=* (intel#2890) [SYCL] Fix spec constants support in integration header (intel#2896) [Driver] Update unbundling of offload libraries to use archive type (intel#2883) [SYCL][NFC] Clang format SYCL.cpp (intel#2891) [CODEOWNERS] Add code owners for DPC++ tools (intel#2884) [XPTIFW] Enable in-tree builds (intel#2849) [SYCL] Don't dump IR and dot files by default in the LowerWGScope pass (intel#2887) [SYCL] Use llvm-link's only-needed option to link device libs (intel#2783) ...
Fixed the issue that instead of re-using previously assigned IDs
for elements of a composite spec constant, all elements used the
same ID, which was taken from the last element of the composite.