You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Free function host compilation bugfix (#19541)
The `KernelInfoData` struct is specialized in the integration header for
free function kernels and results in compilation errors when using other
host compilers to compile code for example while using
`-fsycl-host-compiler=g++` . This PR removes its generation for free
function kernels in the integration header altogether since it is not
used anywhere.
For more info about the bug tackled by this PR:
`KernelInfoData` struct is specialized in the integration header for
unnamed kernels such as free function kernels with the primary
definition located in `kernel_desc.hpp`. The primary definition however
seems to be conditional upon the fact that the unnamed lambda extension
must be enabled which is not the case with other host compilers and we
end up with an error of specialization without a primary template.
Furthermore setting `-fsycl-unnamed-lambda` doesn't do the trick as
apparently it is not allowed to be used together with
`-fsycl-host-compiler`. Since it seems unreasonable to disallow using
other host compilers with free function kernels, this seemed one of the
easier solutions at the moment.
Another approach would be to potentially remove the ifdefs in
kernel_desc.hpp that conditionally include/exclude `KernelInfo `and
`KernelInfoData` and have them both available unconditionally. Tagging
@bader for some input about this alternative approach.
---------
Co-authored-by: Tom Honermann <[email protected]>
0 commit comments