Skip to content

Conversation

@jinge90
Copy link
Contributor

@jinge90 jinge90 commented Nov 1, 2023

Currently, sycl-post-link tool scans user's device image to detect any undefined function call to items in fallback spirv devicelibs and create a property in final executable to tell which fallback devicelibs are really needed. SYCL runtime will load required fallback spirv libs according to this property.
However, if "SYCL_USE_KERNEL_SPIRV" is used, the kernel is launched from spv file and sycl-post-link tool is not involved to scan and generate the property. Previously, we just load and link all fallback spv files and underlying runtime will remove them when they don't need those code. However, we received a lot of complains about seeing a lot of unnecessary code from underlying runtime. So, this PR is to avoid loading this unnecessary code.
If anyone uses clang++ driver to generate spv file, this file won't depend on any functions from fallback spv since device code has to be linked with wrapper .obj to involve any functions from fallback spv.

@jinge90 jinge90 requested a review from a team as a code owner November 1, 2023 02:29
@jinge90 jinge90 requested a review from dm-vodopyanov November 1, 2023 02:29
@jinge90 jinge90 temporarily deployed to WindowsCILock November 1, 2023 02:30 — with GitHub Actions Inactive
@jinge90 jinge90 temporarily deployed to WindowsCILock November 1, 2023 02:50 — with GitHub Actions Inactive
@jinge90
Copy link
Contributor Author

jinge90 commented Nov 2, 2023

Hi, @intel/llvm-reviewers-runtime and @dm-vodopyanov
Could you take a look at this PR?
Thanks very much.

@againull againull merged commit 8c63509 into intel:sycl Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants