Skip to content
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

Move cl::sycl::memory_order, atomic class and atomic operations to sycl namespace #542

Merged

Conversation

VerenaBeckham
Copy link

Developers can use sycl::memory_order.

@VerenaBeckham VerenaBeckham changed the title Remove sycl::cl::memory_order. Remove cl::sycl::memory_order. Mar 7, 2024
@VerenaBeckham VerenaBeckham force-pushed the verena/cl_memory_order branch from ea0a605 to 06d23f4 Compare March 7, 2024 15:50
@bader
Copy link
Contributor

bader commented Mar 7, 2024

@gmlueck
Copy link
Contributor

gmlueck commented Mar 7, 2024

I don't think this PR changes anything relative to SYCL 1.2.1. We just removed a redundant definition of the memory_order enumeration from the spec. The enumeration is still available in SYCL 2020, and it is still defined elsewhere in the spec.

@AerialMantis
Copy link
Collaborator

AerialMantis commented Mar 8, 2024

I think this change makes sense, thanks! Though on it's own I this will be a breaking change for the deprecated atomic class as that relies on the definition of the memory_order in the cl::sycl namespace.

Technically in SYCL 2020 the sycl and cl::sycl namespaces are synonymous with each other if the CL/sycl.hpp header is included, so the intention is that this would be equivalent to having this in the sycl namespace, but having an interface still explicitly defined in the cl::sycl namespace suggests this is an exception to the rule.

From what I can tell this synopsis, the following synopsis for deprecated atomic free functions and a couple of member functions in the accessor synopsis are the only places where the cl::sycl namespace is still explicitly used, I think we should extend this PR to also switch from cl::sycl to sycl here to avoid any confusion.

@gmlueck
Copy link
Contributor

gmlueck commented Mar 8, 2024

From what I can tell this synopsis, the following synopsis for deprecated atomic free functions and a couple of member functions in the accessor synopsis are the only places where the cl::sycl namespace is still explicitly used, I think we should extend this PR to also switch from cl::sycl to sycl here to avoid any confusion.

I think this makes sense. At one point, we discussed the possibility of structuring the header file so that deprecated APIs are only available when <CL/sycl.hpp> is included, but that never made it into the spec. I suspect the fact that the atomic interface is documented in the cl::sycl namespace is a holdover from that thinking. At this point, there is no correlation between deprecated APIs and the cl::sycl namespace, so I think we should just document atomic in the sycl namespace.

@VerenaBeckham
Copy link
Author

I also moved the atomic class and atomic operations into the sycl namespace.

@VerenaBeckham VerenaBeckham changed the title Remove cl::sycl::memory_order. Move cl::sycl::memory_order, atomic class and atomic operations to sycl namespace Mar 11, 2024
@gmlueck
Copy link
Contributor

gmlueck commented Mar 11, 2024

I also moved the atomic class and atomic operations into the sycl namespace.

Thanks, this looks good!

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Thanks!

@gmlueck gmlueck added the Agenda To be discussed during a SYCL committee meeting label Mar 14, 2024
Copy link
Collaborator

@AerialMantis AerialMantis left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@tomdeakin
Copy link
Contributor

One more review.

@tomdeakin tomdeakin removed the Agenda To be discussed during a SYCL committee meeting label Mar 25, 2024
@tomdeakin
Copy link
Contributor

WG approved to merge

@gmlueck gmlueck merged commit b8ae78b into KhronosGroup:SYCL-2020/master Apr 4, 2024
2 checks passed
keryell pushed a commit that referenced this pull request Sep 10, 2024
Move cl::sycl::memory_order, atomic class and atomic operations to sycl namespace
gmlueck added a commit that referenced this pull request Nov 7, 2024
Move cl::sycl::memory_order, atomic class and atomic operations to sycl namespace

(cherry picked from commit b8ae78b)
gmlueck added a commit that referenced this pull request Nov 7, 2024
Move cl::sycl::memory_order, atomic class and atomic operations to sycl namespace

(cherry picked from commit b8ae78b)
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.

7 participants