Description
Is your feature request related to a problem? Please describe
clang lang option currently have SYCLIsHost
and SYCLIsDevice
. However this creates 3 possible states, making harder to reason about: all false when SYCL is disable or one of them true if enabled. Addition of compatibility mode this naming creates confusion (#12757 (comment))
Describe the solution you would like
Per discussion with @tahonermann, following the approach used by CUDA could make things a bit simpler:
One simple flag SYCL
which indicates the SYCL features are enabled and SYCLIsDevice
which would indicate device specific processing if true.
We could go a bit further by introducing a IsOffloading
options which would indicates we are offloading using a programming model (SYCL, CUDA, HIP or OpenMP), enabling a simpler access to common part of the compiler for these programming model.
Describe alternatives you have considered
No response
Additional context
No response