Skip to content

[SYCL] Move general language extensions to the ONEAPI namespace #2231

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 19 commits into from
Aug 20, 2020

Conversation

jbrodman
Copy link
Contributor

Breaking #2155 into smaller PRs.

This concentrates general language extensions into the ONEAPI namespace.

It includes:
Atomics
Printf
Group Algorithms
Reductions
Sub-groups
Specialization Constants
Function Pointers

Signed-off-by: James Brodman james.brodman@intel.com

Signed-off-by: James Brodman <james.brodman@intel.com>
Copy link
Contributor

@Pennycook Pennycook left a comment

Choose a reason for hiding this comment

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

I'd be okay with changes to documentation being addressed in a separate PR, but I'm curious to hear what others think.

Another concern I have is that this will appear as a breaking change between one compiler release and the next, with no warning. Would it be worth adding something temporary defining the intel namespace as containing everything from the ONEAPI namespace?

@@ -242,7 +242,7 @@ struct get_kernel_name_t<auto_name, Type> {
using name = Type;
};

namespace experimental {
namespace ONEAPI {
Copy link
Contributor

Choose a reason for hiding this comment

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

intel::experimental::spec_constant doesn't have an extension defined, and I think we might confuse developers if we start mixing extensions and non-extensions in the same namespace. As is, using sycl::ONEAPI will import experimental functionality unexpectedly.

Is there a reason not to keep this as ONEAPI::experimental after the rename? Otherwise I think somebody should define extensions for these things.

Same comment applies to intel::experimental::printf.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I'd prefer to make it ONEAPI::experimental over intel::experimental.

@@ -1,4 +1,4 @@
//==---------------- atomic.hpp - SYCL_INTEL_extended_atomics --------------==//
//==--------------- atomic.hpp - SYCL_ONEAPI_extended_atomics --------------==//
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're changing the name of the extensions as well as the namespace they're in, I think we should really update the extension documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok sure - but can that be a different PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine by me, but I wanted to flag it somewhere.


#ifndef __DISABLE_SYCL_INTEL_GROUP_ALGORITHMS__
#ifndef __DISABLE_SYCL_ONEAPI_GROUP_ALGORITHMS__
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as before RE naming. This macro is now undocumented.

Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

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

@jbrodman you need to update DEV_ABI version in CMakeLists.txt

BTW, any particular reason why it's spelled ONEAPI and not oneapi?

@keryell
Copy link
Contributor

keryell commented Aug 3, 2020

@jbrodman you need to update DEV_ABI version in CMakeLists.txt

BTW, any particular reason why it's spelled ONEAPI and not oneapi?

I was about to suggest... oneAPI. :-)
The recent feedback from SYCL committee was to use uppercase for extensions to limit conflict risks. But perhaps it should be at least 1 uppercase letter? So we can have also triSYCL, hipSYCL, ComputeCpp...

Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
@jbrodman jbrodman requested a review from bader as a code owner August 3, 2020 17:10
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
bader
bader previously approved these changes Aug 3, 2020
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

I think I'm owning only one file - llvm/test/tools/sycl-post-link/sc_sym_two_refs.ll.
Changes in this file looks okay, but doesn't seem to be necessary for runtime changes.

Signed-off-by: James Brodman <james.brodman@intel.com>
@jbrodman jbrodman changed the title [SYCL][WIP] Move general language extensions to the ONEAPI namespace [SYCL] Move general language extensions to the ONEAPI namespace Aug 3, 2020
Signed-off-by: James Brodman <james.brodman@intel.com>
Fznamznon
Fznamznon previously approved these changes Aug 4, 2020
Copy link
Contributor

@Fznamznon Fznamznon left a comment

Choose a reason for hiding this comment

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

I'm ok with FE changes.

@jbrodman jbrodman requested review from Fznamznon and Pennycook August 4, 2020 14:40
Copy link
Contributor

@Pennycook Pennycook left a comment

Choose a reason for hiding this comment

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

I didn't spot this before because it isn't part of the diff, but atomic_accessor.hpp still has _INTEL_ in its copyright header. It might be worth grepping to see if any others do as well.

Signed-off-by: James Brodman <james.brodman@intel.com>
@jbrodman
Copy link
Contributor Author

jbrodman commented Aug 4, 2020

I didn't spot this before because it isn't part of the diff, but atomic_accessor.hpp still has _INTEL_ in its copyright header. It might be worth grepping to see if any others do as well.

Fixed. Didn't find more.

Fznamznon
Fznamznon previously approved these changes Aug 17, 2020
bader
bader previously approved these changes Aug 17, 2020
@bader
Copy link
Contributor

bader commented Aug 17, 2020

/summary:run

v-klochkov
v-klochkov previously approved these changes Aug 17, 2020
@jbrodman jbrodman requested a review from alexbatashev August 18, 2020 14:43
@jbrodman
Copy link
Contributor Author

Pennycook
Pennycook previously approved these changes Aug 18, 2020
AlexeySachkov
AlexeySachkov previously approved these changes Aug 19, 2020
Signed-off-by: James Brodman <james.brodman@intel.com>
@bader bader merged commit a73369d into intel:sycl Aug 20, 2020
jsji pushed a commit that referenced this pull request Nov 30, 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.

10 participants