Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions sycl/include/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,14 @@ class __SYCL_EXPORT handler {
// Some host compilers may have different captures from Clang. Currently
// there is no stable way of handling this when extracting the captures, so
// a static assert is made to fail for incompatible kernel lambdas.
static_assert(!KernelHasName || sizeof(KernelFunc) == KI::getKernelSize(),
"Unexpected kernel lambda size. This can be caused by an "
"external host compiler producing a lambda with an "
"unexpected layout. This is a limitation of the compiler.");
static_assert(
!KernelHasName || sizeof(KernelFunc) == KI::getKernelSize(),
"Unexpected kernel lambda size. This can be caused by an "
"external host compiler producing a lambda with an "
"unexpected layout. This is a limitation of the compiler."
"In many cases the difference is related to capturing constexpr "
"variables. In such cases removing constexpr specifier aligns the "
"captures between the host compiler and the device compiler.");

// Empty name indicates that the compilation happens without integration
// header, so don't perform things that require it.
Expand Down