-
Notifications
You must be signed in to change notification settings - Fork 738
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
Compiler option to control SYCL extensions. #806
Comments
What if user wants to use a particular set of extension?
Just an idea:
We could enable automatic passing of defines if extension is enabled (probably this will be easier for some users) |
I don't see any problems with that. Unused extensions do not affect final results. I think this proposal makes |
I think there might be problems, for example, by SYCL spec you cannot capture a pointer as kernel argument. However, it is legal in USM extension. My point is that it might be not so clear which exact set of extensions are enabled and user might accidentally use more functionality from extensions than he thought/intended originally. |
Maybe we want both? We could add |
For OpenCL we also have |
|
Summary of "SYCL upstream working group" discussion:
|
If we go with |
|
FYI: I'm trying to clarify clang community preference in this thread: http://lists.llvm.org/pipermail/cfe-dev/2019-November/064016.html. |
I've prepared an initial version of the document describing these options: #1793 |
Maybe as |
Can you explain what conflicts you're concerned about? The point to Or are you suggesting we go with a C++-style of feature testing where the compiler predefines a bunch of feature testing macros, similar to how |
Perhaps |
My feelings are that it doesn't put us more in the C++ mood (
on top of any existing boilerplate for handling If we want to be more in the C++ mood, we'd go with |
Note that the SYCL 2020 provisional specification defines a form of feature-test macros that vendors should use for their extensions. The form includes a string which identifies the vendor, which helps someone reading the code to know which vendor's extension is being used. The working group decided on a all-caps style of feature-test macro to be consistent with other macros in the SYCL spec: |
Today compiler has only two relevant options to turn on/off SYCL functionality:
-sycl-std=<value>
-fsycl-unnamed-lambda
-sycl-std
today supports only one value: "1.2.1" (default) and doesn't really help to restrict functionality to SYCL 1.2.1 version.I think it would be useful if compiler provides more fine grain control over developed SYCL extensions (e.g. unnamed-lambda #387, CTAD extensions #773, USM #256, etc.).
In addition to that, it would be great to align compiler option names with community way.
E.g. should we keep SYCL specific option
-sycl-std
or extend existing-std
option (e.g.-std
supports OpenCL standard versions,hip
andcuda
values).Proposal
-sycl-std=
values with1.2.1-ext
, which should enable SYCL-1.2.1 functionality with extensions. In addition to that I think this should be a default value similar to how clang enables C++ extensions by default.Thoughts?
The text was updated successfully, but these errors were encountered: