Skip to content

Compiler option to control SYCL extensions. #806

Open
@bader

Description

@bader

Today compiler has only two relevant options to turn on/off SYCL functionality:

Option Description
-sycl-std=<value> SYCL language standard to compile for
-fsycl-unnamed-lambda Allow unnamed SYCL lambda kernels

-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 and cuda values).

Proposal

  1. Extend -sycl-std= values with 1.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.
  2. Add more options controlling extensions. TBD: define which extensions require compiler option. Some extensions do not require compiler support and can be controlled via define (e.g. Intel sub-groups).
  3. Align options naming scheme with the clang community to simplify upsteaming.

Thoughts?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions