-
Notifications
You must be signed in to change notification settings - Fork 802
[SYCL] Fix SYCL_EXTERNAL device code when linking with a static lib #14256
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
Conversation
Static library linking mechanism uses symbols pulled in by the host linker to determine what parts of device code to include during its linking. The exceptions thrown from nd_item on host interfere with that, since all the following host code for the kernel can get optimized away. This change removes those exceptions since nd_item can't be constructed on the host side.
@intel/dpcpp-tools-reviewers Could you please have a look? |
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, quick q on the test but not a blocker
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. Thanks
@sergey-semenov, FYI. 7999e27 also breaks debugger tests when SYCL device is CPU. Probably the best solution at the moment is to revert 7999e27 to fix both problems at once (not sure if it's possible due to ABI break though). |
Thanks for letting me know. I'd still rather merge this first even if we do end up reverting the stateless change since the ABI breaking window is two days away (I think?) and this is having a big impact on some of our users. |
Static library linking mechanism uses symbols pulled in by the host linker to determine what parts of device code to include during its linking. The exceptions thrown from nd_item on host interfere with that, since all the following host code for the kernel can get optimized away.
This change removes those exceptions since nd_item can't be constructed on the host side.