[clang] [clang] Fix inconsistencies with the device_kernel attr on different targets (PR #161905)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 12:25:27 PDT 2025
tahonermann wrote:
@sarnex, @jhuber6,
> @tahonermann Would renaming `sycl_kernel` to `spirv_kernel`/`spir_kernel` resolve your concern?
No, that would be much worse. SYCL is not synonymous with SPIR-V. Functions decorated with the `sycl_kernel` attribute are used to generate kernels for PTX, AMDGCN, as well as SPIR-V. `sycl_kernel` doesn't make a function an actual kernel entry point.
Unfortunately, it is hard to effectively compare the semantics of `sycl_kernel` with `nvptx_kernel`, `amdgpu_kernel`, `kernel`, and `__kernel` because the [documentation](https://clang.llvm.org/docs/AttributeReference.html#device-kernel-sycl-kernel-nvptx-kernel-amdgpu-kernel-kernel-kernel) that purports to describe them only talks about SYCL. I think the changes made to that documentation should be reverted and appropriate documentation for those other attributes added.
https://github.com/llvm/llvm-project/pull/161905
More information about the cfe-commits
mailing list