Skip to content

Commit 3e4b795

Browse files
[DO NOT MERGE] Int header presence experiment
1 parent a99eae6 commit 3e4b795

File tree

2 files changed

+12
-60
lines changed

2 files changed

+12
-60
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -843,52 +843,23 @@ class __SYCL_EXPORT handler {
843843
Dims>());
844844
#endif
845845

846-
constexpr bool KernelHasName =
847-
detail::getKernelName<KernelName>() != nullptr &&
848-
detail::getKernelName<KernelName>()[0] != '\0';
849-
850846
// Some host compilers may have different captures from Clang. Currently
851847
// there is no stable way of handling this when extracting the captures, so
852848
// a static assert is made to fail for incompatible kernel lambdas.
853849

854850
// 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;
892863
setKernelNameBasedCachePtr(detail::getKernelNameBasedCache<KernelName>());
893864

894865
// If the kernel lambda is callable with a kernel_handler argument, manifest

sycl/test/basic_tests/kernel_size_mismatch.cpp

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)