@@ -371,15 +371,26 @@ TEST_P(TestSYCLKernelBundleFromSource, CheckCreateFromSYCLSource)
371371{
372372 ASSERT_TRUE (KBRef != nullptr );
373373 ASSERT_TRUE (DPCTLKernelBundle_HasSyclKernel (KBRef, " vector_add" ));
374+ // DPC++ version 2025.1 supports compilation of SYCL template kernels,
375+ // but does not yet support referencing them with the unmangled name.
374376 ASSERT_TRUE (
375- DPCTLKernelBundle_HasSyclKernel (KBRef, " vector_add_template<int>" ));
377+ DPCTLKernelBundle_HasSyclKernel (KBRef, " vector_add_template<int>" ) ||
378+ DPCTLKernelBundle_HasSyclKernel (
379+ KBRef, " _Z33__sycl_kernel_vector_add_templateIiEvPT_S1_S1_" ));
376380}
377381
378382TEST_P (TestSYCLKernelBundleFromSource, CheckGetKernelSYCLSource)
379383{
380384 auto AddKernel = DPCTLKernelBundle_GetSyclKernel (KBRef, " vector_add" );
381385 auto AxpyKernel =
382386 DPCTLKernelBundle_GetSyclKernel (KBRef, " vector_add_template<int>" );
387+ if (AxpyKernel == nullptr ) {
388+ // DPC++ version 2025.1 supports compilation of SYCL template kernels,
389+ // but does not yet support referencing them with the unmangled name.
390+ AxpyKernel = DPCTLKernelBundle_GetSyclKernel (
391+ KBRef, " _Z33__sycl_kernel_vector_add_templateIiEvPT_S1_S1_" );
392+ }
393+
383394 ASSERT_TRUE (AddKernel != nullptr );
384395 ASSERT_TRUE (AxpyKernel != nullptr );
385396 DPCTLKernel_Delete (AddKernel);
0 commit comments