Skip to content

[SYCL] Update aspect numbering #14605

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 3 commits into from
Jul 22, 2024
Merged

Conversation

aejjehint
Copy link
Contributor

@aejjehint aejjehint commented Jul 17, 2024

This PR reverts the aspect numbering that was modified in PR #14359 to avoid breaking existing code.

@aejjehint aejjehint requested a review from a team as a code owner July 17, 2024 18:17
aejjehint referenced this pull request Jul 17, 2024
This reverts PR #12453 and #13080

The original PR introducing task sequence was checked in prematurely as
the backend support isn't in yet. When the backend support is in we will
re-submit this change.
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.

Thanks for catching this!

@steffenlarsen steffenlarsen changed the title update aspect numbering [SYCL] Update aspect numbering Jul 22, 2024
__SYCL_ASPECT(ext_oneapi_queue_profiling_tag, 72)
__SYCL_ASPECT(ext_oneapi_virtual_mem, 73)
__SYCL_ASPECT(ext_oneapi_cuda_cluster_group, 74)
__SYCL_ASPECT(ext_oneapi_limited_graph, 63)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need a gap in the numbering here? It seems we're going from 61 directly to 63.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@steffenlarsen explained to me that we cannot change aspect numbers to avoid breaking existing code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Existing code inside the SYCL runtime or user code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When task-sequence gets re-submitted we can put it back where it was in that gap.

Copy link
Contributor

Choose a reason for hiding this comment

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

The gap is fine, but aspect values should not change. Imagine a kernel that uses double. The compiler will be told that aspect::fp64 is N and stores that with the kernel so the runtime can then check if a kernel is supported on a device. Now, let's say we change fp64 to be N+1. If the user does not recompile their kernel, the runtime will be told that the kernel requires aspect N which is no longer fp64.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this be allowed in/around an ABI-breaking window? If we allow ABI-break, such an application needs to be re-compiled anyway, right?

I don't want to hold up this specific PR on this issue (in particular if we plan to re-insert the task-sequence into the gap later), so I'm fine with merging. But for the future I think we should have some process/policy defined for this kind of scenario, as it's similar to an ABI-break.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this be allowed in/around an ABI-breaking window? If we allow ABI-break, such an application needs to be re-compiled anyway, right?

Yes, it should, but it was not approved as an ABI/API break, so I would feel better about reverting it.

I don't want to hold up this specific PR on this issue (in particular if we plan to re-insert the task-sequence into the gap later), so I'm fine with merging. But for the future I think we should have some process/policy defined for this kind of scenario, as it's similar to an ABI-break.

Like changing an enum that crosses library boundaries, I think this would fall under our ABI/API break policy. They are sadly hard to track and sycl::aspect is even worse. Maybe we could have some tests for it. 🤔

@steffenlarsen steffenlarsen merged commit c44ba08 into intel:sycl Jul 22, 2024
14 checks passed
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