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
@github-actions
Copy link
Contributor

@intel/llvm-gatekeepers please consider merging

@aelovikov-intel
Copy link
Contributor Author

aelovikov-intel commented Sep 12, 2025

#0 0x00007ff76180902c sycl::_V1::detail::queue_impl::~queue_impl(void) D:\github\actions-runner\_work\llvm\llvm\src\sycl\source\detail\queue_impl.hpp:257:0
#1 0x00007ff7619fce6f std::_Ref_count_base::_Decref C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\include\memory:1161:0
#2 0x00007ff7619fce6f std::_Ptr_base<sycl::_V1::detail::queue_impl>::_Decref C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\include\memory:1377:0
#3 0x00007ff7619fce6f std::shared_ptr<sycl::_V1::detail::queue_impl>::{dtor} C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\include\memory:1682:0
#4 0x00007ff7619fce6f sycl::_V1::detail::Scheduler::NotifyHostTaskCompletion(class sycl::_V1::detail::Command *) D:\github\actions-runner\_work\llvm\llvm\src\sycl\source\detail\scheduler\scheduler.cpp:517:0
#5 0x00007ff7619e7687 sycl::_V1::detail::DispatchHostTask::operator()(void) const D:\github\actions-runner\_work\llvm\llvm\src\sycl\source\detail\scheduler\commands.cpp:487:0
#6 0x00007ff761940fdf sycl::_V1::detail::ThreadPool::worker(void) D:\github\actions-runner\_work\llvm\llvm\src\sycl\source\detail\thread_pool.hpp:79:0
#7 0x00007ff76193b711 std::thread::_Invoke<class std::tuple<class `private: void __cdecl sycl::_V1::detail::ThreadPool::start(void)'::`3'::<lambda_1>>, 0>(void *) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\include\thread:61:0

#8 0x00007ffe093937b0 (C:\WINDOWS\System32\ucrtbase.dll+0x37b0)

#9 0x00007ffe0a87e8d7 (C:\WINDOWS\System32\KERNEL32.DLL+0x2e8d7)

#10 0x00007ffe0c208d9c (C:\WINDOWS\SYSTEM32\ntdll.dll+0x8d9c)

Access violation

doesn't seem related and previous revision of the PR (that differs only in comments) has passed.

@aelovikov-intel aelovikov-intel merged commit 9eaa344 into intel:sycl Sep 12, 2025
27 of 28 checks passed
@aelovikov-intel aelovikov-intel deleted the sycl-omp-compile branch September 12, 2025 19:21
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.

3 participants