Describe the bug
If an application for example is built for NVIDIA GPUs with -fsycl-targets=nvptx64 but then run on a device with an Intel GPU only, an error like this is reported:
❯ icpx -fsycl -fsycl-targets=nvptx64-nvidia-cuda main.cpp
❯ ./a.out
terminate called after throwing an instance of 'sycl::_V1::exception'
what(): No kernel named _ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_EUlvE_ was found
[1] 415163 IOT instruction (core dumped) ./a.out
Probably the other way around the same happens, but I don't have access to machine with an NVIDIA GPU to test.
To reproduce
- Include a code snippet that is as short as possible
#include <sycl/sycl.hpp>
int main() {
sycl::queue q;
int *d_result = sycl::malloc_device<int>(1, q);
q.submit([&](sycl::handler &cgh) {
cgh.single_task([=]() { *d_result = 1; });
});
return 0;
}
- Specify the command which should be used to compile the program
clang -fsycl -fsycl-targets=nvptx64-nvidia-cuda main.cpp
- Specify the command which should be used to launch the program
- Indicate what is wrong and what was expected
The error message from the SYCL runtime looks like this:
No kernel named _ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_EUlvE_ was found
this is pretty bad, we get a mangled name for the kernel lambda that's very intimidating, but is just noise, but no actual indication that the problem could be with how the application was built.
Environment
- OS: Linux
- Target device and vendor: Mixed
- DPC++ version:
- Dependencies version:
Additional context
No response
Describe the bug
If an application for example is built for NVIDIA GPUs with
-fsycl-targets=nvptx64but then run on a device with an Intel GPU only, an error like this is reported:Probably the other way around the same happens, but I don't have access to machine with an NVIDIA GPU to test.
To reproduce
The error message from the SYCL runtime looks like this:
this is pretty bad, we get a mangled name for the kernel lambda that's very intimidating, but is just noise, but no actual indication that the problem could be with how the application was built.
Environment
Additional context
No response