Closed
Description
Describe the bug
When the "assert()" function is called and compiled with the CUDA backend, the compiler will generate code that has an unresolved symbol for assert:
ptxas fatal : Unresolved extern function '__assert_fail'
clang-13: error: ptxas command failed with exit code 255 (use -v to see invocation)
assert()
on the other hand is working fine when using native cuda.
To Reproduce
To reproduce, just add assert
to any kernel like:
q.submit([&](sycl::handler& cgh) {
cgh.parallel_for({1}, [=](sycl::id<1> index) {
assert(false);
});
});
and compile with:
clang++ -fsycl -fsycl-unnamed-lambda -fsycl-targets=nvptx64-nvidia-cuda-sycldevice sycl_test/main.cpp
Environment (please complete the following information):
- OS: Linux 20.04
- Target device and vendor: CUDA
- DPC++ version:
clang++ --version
:
clang version 13.0.0 (https://github.com/intel/llvm c7d8867e5f305fa96201b8c584e5be356642a06f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /dpcpp/bin