intel / intel/llvm

[SYCL] Kernel ID lookup should fail at link-time

Open
#8,150 0 comments 0 reactions 0 assignees View on GitHub
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

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.