Skip to content

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented Sep 11, 2025

Follow-up for #19990

Downstream CI uncovered another scenario where
detail::CompileTimeKernelInfo<KernelName>.Name might be empty (other than non-SYCL compilation in some of the [unit]tests). That happens when compiling the same TU using multiple offload models (e.g., both SYCL and OMP) and the device compilation for non-SYCL model doesn't use SYCL integration header to provide kernel information.

Ideally, we should be just guarding static_asserts with some #if __SYCL_WHATEVER but we don't set any SYCL-related macro when using 3rd party host compilers. Deal with that by turning compile-time static_assert into a run-time assert unless we can guarantee that SYCL kernel information is available.

Downstream CI uncovered another scenario where
`detail::CompileTimeKernelInfo<KernelName>.Name` might be empty (other
than non-SYCL compilation in some of the [unit]tests). That happens when
compiling the same TU using multiple offload models (e.g., both SYCL and
OMP) and the device compilation for non-SYCL model doesn't use SYCL
integration header to provide kernel information.

Also, my previous comments about `__usmfill` turned out to be incorrect.
We do NOT unconditionally instantiate any of those in the
`sycl/handler.hpp`, it was individual unittests that did that.
@aelovikov-intel aelovikov-intel changed the title [SYCL] Follow-up for https://github.com/intel/llvm/pull/19990 [SYCL] Assert for kernel having a name in runtime vs compile time Sep 11, 2025
@aelovikov-intel aelovikov-intel marked this pull request as ready for review September 11, 2025 23:22
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner September 11, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants