Skip to content

[SYCL][Driver] Do not pass libsycl.so to host linker#22654

Merged
sarnex merged 1 commit into
intel:syclfrom
sarnex:linker
Jul 16, 2026
Merged

[SYCL][Driver] Do not pass libsycl.so to host linker#22654
sarnex merged 1 commit into
intel:syclfrom
sarnex:linker

Conversation

@sarnex

@sarnex sarnex commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

In previous compiler releases, we linked against libsycl.so just with

-L<dir>bin/../lib ... -lsycl ... 

Starting with upstream commit llvm/llvm-project#174877, we added what should be a path to libsycl.so, resulting in the following in intel/llvm:

-L<dir>bin/../lib ... <dir>/bin/../lib/libsycl.so ... -lsycl ... 

So we do the same thing twice. Note we only do the -lsycl part in intel/llvm, that does not exist upstream.

We have a bug report (CMPLRLLVM-76960) where the path resolution is failing, we compute an empty path, so we end up trying to link a bare libsycl.so with no path, which fails.

Of course we should fix this, but I think the best solution is:

  1. We revert the failing upstream behavior temporarily and return to the old
-L<dir>bin/../lib ... -lsycl ... 

which has been working fine for years.

  1. Separately, debug the failing libsycl.so path resolution and fix it

  2. Remove the -lsycl logic which exists in intel/llvm so that we match upstream and only use the path to libsycl.so, which upstream prefers.

I am not doing 2) and 3) in this PR because we just released intel/llvm release 7.0.0 and we are going to need 7.0.1 because of this issue, so I don't want to delay it. I also need to cherry pick this internally ASAP.

After this is merged and cherry picked I will work on steps 2 and 3.

I checked Windows and we do not have a similar issue, so this is the only fix required.

@sarnex sarnex added the new-offload-model Enables testing with NewOffloadModel. label Jul 16, 2026
@sarnex

sarnex commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

I ran new offload model tests to be safe, they all passed (failures are unrelated)

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
@sarnex
sarnex marked this pull request as ready for review July 16, 2026 19:44
@sarnex
sarnex requested a review from a team as a code owner July 16, 2026 19:44
@sarnex
sarnex requested a review from mdtoguchi July 16, 2026 19:44
@sarnex

sarnex commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Hey @mdtoguchi, since @srividya-sundaram is out, can you please review this as soon as you get a chance? We need a new intel/llvm release with this issue fixed, so I'm hoping to get it merged soon. Hopefully the PR description provides enough info. Thanks

@mdtoguchi mdtoguchi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. I'm sure the library location movement impacted the ability to resolve libsycl.so properly.

@sarnex

sarnex commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Yeah, probably I broke it somehow. Will take a look after I cherry pick this everywhere I need, thanks!

@sarnex
sarnex merged commit 8fb503d into intel:sycl Jul 16, 2026
34 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-offload-model Enables testing with NewOffloadModel.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants