Skip to content

[SYCL] Updated aspects list to be SYCL 2020 compliant #8751

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 10 commits into from
Mar 28, 2023

Conversation

andylshort
Copy link

@andylshort andylshort commented Mar 23, 2023

This patch updates the device aspect implementations to account for the changes made in Section 4.6.4.3 of the specification. Most changed aspects have been addresses already, so this patch specifically:

  • Adds default implementations for the emulated and host_debuggable aspects, returning false for now. These require further device- and/or driver-specific work so are left as is for now. This fixes sycl::aspect::emulated is not defined #8324
  • Deprecates usm_restricted_shared_allocations aspect as the concept no longer exists, and host aspect as "host" device concept removed from SYCL 2020. Deprecated aspects will be removed in later releases.

- Removed usm_restricted_shared_allocations aspect
It is not a part of the SYCL 2020 specification so has been removed.

- Deprecate host aspect in favour of cpu as "host" device concept removed from SYCL 2020
Updated tests to add diagnostics for deprecation warning where needed.

Once the host aspect is to be removed, these tests can go back to
not requiring diagnostics.

- Added placeholder aspects for emulated and host_debuggable
Currently both return false while while further implementation details are obtained.

- Removed duplication host_debuggable aspect def

- Added emulated aspect to device_has/have
@andylshort andylshort requested a review from a team as a code owner March 23, 2023 12:36
@andylshort andylshort requested review from steffenlarsen and a team March 23, 2023 12:36
@andylshort andylshort temporarily deployed to aws March 23, 2023 13:03 — with GitHub Actions Inactive
@andylshort andylshort temporarily deployed to aws March 23, 2023 13:34 — with GitHub Actions Inactive
Removing symbols will cause a breka in ABI, so re-added and commented
to remove in future.
@andylshort
Copy link
Author

/verify with intel/llvm-test-suite#1685

Changed usm_restricted_shared_allocations from removed to deprecated.
Removal would have incurred an ABI break, so deprecating, even though it's
not in the SYCL 2020 specification.

Host changed to remove cpu inference, just says it's deprecated now.
@andylshort andylshort temporarily deployed to aws March 23, 2023 17:16 — with GitHub Actions Inactive
@andylshort andylshort temporarily deployed to aws March 23, 2023 18:30 — with GitHub Actions Inactive
@AlexeySachkov AlexeySachkov dismissed their stale review March 24, 2023 09:53

Comments from my side were resolved

@andylshort andylshort temporarily deployed to aws March 24, 2023 11:47 — with GitHub Actions Inactive
@@ -2,3 +2,5 @@ __SYCL_ASPECT_DEPRECATED(int64_base_atomics, 7, "use atomic64 instead")
__SYCL_ASPECT_DEPRECATED(int64_extended_atomics, 8, "use atomic64 instead")
// Special macro for aspects that don't have own token
__SYCL_ASPECT_DEPRECATED_ALIAS(usm_system_allocator, usm_system_allocations, "use usm_system_allocations instead")
__SYCL_ASPECT_DEPRECATED(usm_restricted_shared_allocations, 16, "deprecated in SYCL 2020")
Copy link
Contributor

Choose a reason for hiding this comment

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

@gmlueck - It looks like this is in neither SYCL 1.2.1 nor SYCL 2020. Reading the definition of it, it does not seem to have a direct alternative. Is it okay to deprecate it (and remove it in an later release) or do we need an extension to have an alternative?

Copy link
Contributor

Choose a reason for hiding this comment

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

This was an aspect we had in the SYCL 2020 provisional specification, but it was dropped by the time we finalized the spec. Yes, I think it's OK to deprecate it with no alternative. I think the original definition was never very clear.

@andylshort andylshort temporarily deployed to aws March 24, 2023 12:28 — with GitHub Actions Inactive
@andylshort andylshort temporarily deployed to aws March 24, 2023 16:35 — with GitHub Actions Inactive
@andylshort andylshort temporarily deployed to aws March 24, 2023 17:06 — with GitHub Actions Inactive
@andylshort
Copy link
Author

Failure on HIP target isn't related to this patch - it's to do with accessor members being deprecated.

@AlexeySachkov AlexeySachkov requested a review from a team March 24, 2023 21:49
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.

LGTM! Would still be good to ensure that we want the deprecation of usm_restricted_shared_allocations.

@andylshort andylshort temporarily deployed to aws March 27, 2023 10:51 — with GitHub Actions Inactive
@andylshort andylshort temporarily deployed to aws March 27, 2023 13:59 — with GitHub Actions Inactive
@AlexeySachkov AlexeySachkov self-assigned this Mar 28, 2023
@AlexeySachkov AlexeySachkov merged commit b9122b3 into intel:sycl Mar 28, 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.

sycl::aspect::emulated is not defined
4 participants