Thank you for your question, this is a challenging issue and we are considering a lot of alternatives.
The diagnostics are not the big issue here, as it is possible to check all of the functions called inside a kernel.
We are considering a lot of different methods for efficiently enabling the inclusion of functions defined in multiple translation units in SYCL kernels.
This is indeed a very useful feature, which in the case of SYCL we have to provide more general answers, even if they push compiler technology harder.
In this case, we have to ensure that the solution is portable among all the different host and SYCL device compilers and platforms, unlike other models,
which enforce the usage of one compiler for all the source code.
This is not described in the current specification, but we are working on providing a solution, which would provide the maximum portability possible.
SPIR is designed to be a portable intermediate representation therefore to allow kernels to be compiled in various different languages and still be compatible with any OpenCL implementation that supports it. However the SYCL specification does not mandate that the binary format used to represent SYCL kernels must be SPIR, it simply states that it must be a binary format that is supported by an OpenCL implementation.
Originally Posted by Meteorhead
Tags for this Thread