Skip to content

[SYCL] Make SYCL RT compatible with the new offload entry type #17109

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

Merged
merged 18 commits into from
Mar 10, 2025

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Feb 21, 2025

llvm/llvm-project#124018 change the type of offload struct. This PR makes SYCL RT compatible with the new format, while keeping backwards compatibility with the older version (till next ABI-break window).

@@ -1869,31 +1869,32 @@ void ProgramManager::addImages(sycl_device_binaries DeviceBinary) {
for (sycl_offload_entry EntriesIt = EntriesB; EntriesIt != EntriesE;
Copy link
Contributor

Choose a reason for hiding this comment

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

will the iterator work when the input binary is using legacy entry format? sizeof entries are different.

Copy link
Contributor

@sergey-semenov sergey-semenov left a comment

Choose a reason for hiding this comment

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

LGTM overall

++EntriesIt) {
sycl_offload_entry EntriesIt;
auto IncrementEntriesIt = [&]() {
if (EntriesIt->IsNewOffloadEntryType())
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't expect a mix of old and new entries, so I think this check should be made once instead of on each increment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 8d70601

@uditagarwal97
Copy link
Contributor Author

@intel/dpcpp-clang-driver-reviewers @intel/dpcpp-tools-reviewers please review the changes. Thanks.

@asudarsa
Copy link
Contributor

asudarsa commented Mar 6, 2025

Thanks so much for putting this change up. I will add my comments (if any) soon.

Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

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

Overall looks good. Minor nits, some of which might need addressing.

Thanks

Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the updates.

@sarnex sarnex merged commit 8e09ffa into intel:sycl Mar 10, 2025
41 of 47 checks passed
adamfidel pushed a commit to reble/llvm that referenced this pull request Mar 11, 2025
…#17109)

llvm/llvm-project#124018 change the type of
offload struct. This PR makes SYCL RT compatible with the new format,
while keeping backwards compatibility with the older version (till next
ABI-break window).

---------

Co-authored-by: Sergey Semenov <[email protected]>
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.

6 participants