@@ -843,52 +843,23 @@ class __SYCL_EXPORT handler {
843
843
Dims>());
844
844
#endif
845
845
846
- constexpr bool KernelHasName =
847
- detail::getKernelName<KernelName>() != nullptr &&
848
- detail::getKernelName<KernelName>()[0 ] != ' \0 ' ;
849
-
850
846
// Some host compilers may have different captures from Clang. Currently
851
847
// there is no stable way of handling this when extracting the captures, so
852
848
// a static assert is made to fail for incompatible kernel lambdas.
853
849
854
850
// TODO remove the ifdef once the kernel size builtin is supported.
855
- #ifdef __INTEL_SYCL_USE_INTEGRATION_HEADERS
856
- static_assert (
857
- !KernelHasName ||
858
- sizeof (KernelType) == detail::getKernelSize<KernelName>(),
859
- " Unexpected kernel lambda size. This can be caused by an "
860
- " external host compiler producing a lambda with an "
861
- " unexpected layout. This is a limitation of the compiler."
862
- " In many cases the difference is related to capturing constexpr "
863
- " variables. In such cases removing constexpr specifier aligns the "
864
- " captures between the host compiler and the device compiler."
865
- " \n "
866
- " In case of MSVC, passing "
867
- " -fsycl-host-compiler-options='/std:c++latest' "
868
- " might also help." );
869
- #endif
870
- // Empty name indicates that the compilation happens without integration
871
- // header, so don't perform things that require it.
872
- if constexpr (KernelHasName) {
873
- // TODO support ESIMD in no-integration-header case too.
874
-
875
- // Force hasSpecialCaptures to be evaluated at compile-time.
876
- constexpr bool HasSpecialCapt = detail::hasSpecialCaptures<KernelName>();
877
- setKernelInfo ((void *)MHostKernel->getPtr (),
878
- detail::getKernelNumParams<KernelName>(),
879
- &(detail::getKernelParamDesc<KernelName>),
880
- detail::isKernelESIMD<KernelName>(), HasSpecialCapt);
881
-
882
- constexpr std::string_view KernelNameStr =
883
- detail::getKernelName<KernelName>();
884
- MKernelName = KernelNameStr;
885
- } else {
886
- // In case w/o the integration header it is necessary to process
887
- // accessors from the list(which are associated with this handler) as
888
- // arguments. We must copy the associated accessors as they are checked
889
- // later during finalize.
890
- setArgsToAssociatedAccessors ();
891
- }
851
+ // TODO support ESIMD in no-integration-header case too.
852
+
853
+ // Force hasSpecialCaptures to be evaluated at compile-time.
854
+ constexpr bool HasSpecialCapt = detail::hasSpecialCaptures<KernelName>();
855
+ setKernelInfo ((void *)MHostKernel->getPtr (),
856
+ detail::getKernelNumParams<KernelName>(),
857
+ &(detail::getKernelParamDesc<KernelName>),
858
+ detail::isKernelESIMD<KernelName>(), HasSpecialCapt);
859
+
860
+ constexpr std::string_view KernelNameStr =
861
+ detail::getKernelName<KernelName>();
862
+ MKernelName = KernelNameStr;
892
863
setKernelNameBasedCachePtr (detail::getKernelNameBasedCache<KernelName>());
893
864
894
865
// If the kernel lambda is callable with a kernel_handler argument, manifest
0 commit comments