Closed
Description
Generally, SYCL device-side macros are being initialized within clang/Frontend/InitPreprocessor.cpp
, e.g. SYCL_EXTERNAL
(https://github.com/intel/llvm/blob/sycl/clang/lib/Frontend/InitPreprocessor.cpp#L1180), __SYCL_DEVICE_ONLY__
(https://github.com/intel/llvm/blob/sycl/clang/lib/Frontend/InitPreprocessor.cpp#L1179), target-specific __SYCL_NVPTX__
(https://github.com/intel/llvm/blob/sycl/clang/lib/Frontend/InitPreprocessor.cpp#L1183). However, there are known inconsistencies with this approach:
- FPGA-specific
__SYCL_ENABLE_USM_ADDR_SPACES__
gets initialized within the Driver: https://github.com/intel/llvm/blob/sycl/clang/lib/Driver/ToolChains/Clang.cpp#L4683 __SYCL_NVPTX__
correctly gets initialized withinInitPreprocessor.cpp
, but is not LIT-tested within the correspondingsycl-macro.cpp
.
Items TBD:
- Identify and move all device target-specific macro initializations into FE
- LIT-test these initializations alongside "general" SYCL device macros