[SYCL] Kernel ID lookup should fail at link-time
Open
bug
confirmed
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
The current design of the kernel name resolution in the SYCL integration header only makes kernel names visible within the same TU. This means that kernel IDs cannot be created for kernels in other TUs, while `get_kernel_id()` and `has_kernel()` should fail at link-time.
As mentioned by @gmlueck in https://github.com/intel/llvm/pull/8070#discussion_r1088961081 a solution is to have the integration header specialize `get_kernel_id()` or change the kernel name resolution from being part of `KernelInfo` to a non-constexpr function declaration specialized by the integration header.
See discussion: https://github.com/intel/llvm/pull/8070#discussion_r1087935797
Contributor guide
Assessment
This issue has not been assessed yet.