intel / intel/llvm

Compiler option to control SYCL extensions.

Open
#806 16 comments 0 reactions 1 assignee Claimed by @AlexeySachkov View on GitHub
confirmed enhancement
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

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

| Option | Description |
| -------- | ------------ |
|`-sycl-std=` | 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.
1. 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).
1. Align options naming scheme with the clang community to simplify upsteaming.

Thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.