Skip to content

Conversation

@mdtoguchi
Copy link
Contributor

Adds support for the -fsyclbin option. This option allows for creation of a SYCL device specific binary. The binary is created via a device compilation before being packaged and sent to the clang-linker-wrapper. The clang-linker-wrapper is responsible to take the device 'object' and create the corresponding .syclbin file.

Adds support for the -fsyclbin option.  This option allows for creation
of a SYCL device specific binary.  The binary is created via a device
compilation before being packaged and sent to the clang-linker-wrapper.
The clang-linker-wrapper is responsible to take the device 'object' and
create the corresponding .syclbin file.
@mdtoguchi
Copy link
Contributor Author

Not ready for prime-time yet. The corresponding support in the clang-linker-wrapper is not in place.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Overall I think this is great and I have tested it locally with the changes from #16873.

I do wonder if we could let -fsyclbin imply -fsycl, as I don't see there being a use-case where you wouldn't have both, but I really don't think it's a big issue either way.

@mdtoguchi
Copy link
Contributor Author

Overall I think this is great and I have tested it locally with the changes from #16873.

I do wonder if we could let -fsyclbin imply -fsycl, as I don't see there being a use-case where you wouldn't have both, but I really don't think it's a big issue either way.

Adding the implication is reasonable - similar to -fsycl-device-only. Maybe update the design to reflect?

@steffenlarsen
Copy link
Contributor

Overall I think this is great and I have tested it locally with the changes from #16873.
I do wonder if we could let -fsyclbin imply -fsycl, as I don't see there being a use-case where you wouldn't have both, but I really don't think it's a big issue either way.

Adding the implication is reasonable - similar to -fsycl-device-only. Maybe update the design to reflect?

Done!

@steffenlarsen
Copy link
Contributor

@mdtoguchi - #16873 has been merged. You can, if you want, change the 3 first RUN lines in sycl/test/syclbin/simple_kernel.cpp to:

// RUN: %clangxx -fsyclbin -o %t.syclbin %t.out

@mdtoguchi mdtoguchi marked this pull request as ready for review May 1, 2025 18:30
@mdtoguchi mdtoguchi requested review from a team as code owners May 1, 2025 18:30
@mdtoguchi mdtoguchi requested a review from maarquitos14 May 1, 2025 18:30
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple of nits.

@mdtoguchi
Copy link
Contributor Author

@intel/llvm-gatekeepers, this is ready for merge. Thanks!

@sommerlukas sommerlukas merged commit 936881a into intel:sycl May 9, 2025
24 checks passed
@mdtoguchi mdtoguchi deleted the fsyclbin-driver branch May 12, 2025 16:46
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.

5 participants