[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)
Alexey Bader via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 4 15:10:14 PST 2026
================
@@ -565,73 +566,84 @@ follows.
namespace sycl {
class handler {
- template<typename KernelNameType, typename KernelType>
- [[ clang::sycl_kernel_entry_point(KernelNameType) ]]
- static void kernel_entry_point(KernelType kernel) {
- kernel();
+ template<typename KernelName, typename... Ts>
+ void sycl_kernel_launch(const char* kernelSymbol, Ts&&... kernelArgs) {
----------------
bader wrote:
@tahonermann, I have a concern about potential naming conflicts with the `handler::sycl_kernel_launch` template name. While the `sycl_` prefix makes it unlikely, there's a theoretical risk that a future SYCL specification could define a symbol with the same name but different semantics, which could lead to compatibility issues.
Should we consider using a reserved identifier (e.g., `__sycl_kernel_launch`) to eliminate this risk? This would follow the convention of using double underscores for implementation-specific identifiers that won't conflict with user code or future standard additions.
What's your take on the trade-off between namespace safety and identifier readability here?
https://github.com/llvm/llvm-project/pull/152403
More information about the cfe-commits
mailing list