Open ssheorey opened 2 months ago
@ssheorey, you should use the intercept-build
tool to generate the compilation database "compile_commands.json" instead of the one generated by cmake
configure command native. The intercept-build
tool will filter out all the options that are specific to the nvcc compiler from the file "compile_commands.json", while the latter does not.
Here is the migration steps advised.
git clone --depth 1 https://github.com/isl-org/Open3D.git
mkdir build && cd build
export CUDACXX=<path/to/nvcc>
cmake -DBUILD_CUDA_MODULE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
make # you shoud make build process run successfully
rm compile_commands.json
intercept-build make -B ## to generate compile_commands.json
dpct -in-root= ../ -out-root=sycl_out -p ./ --use-experimental-features=all
Describe the bug
Errors while trying to convert CUDA code from Open3D to SYCL. Happens for any CUDA file. The errors are about unknown compiler options (warning control options that clang and g++ both recognize). There is also a fatal error about a header file whole directory is given to the compiler with
-isystem
. [See details below]Please let me know if this needs specific configuration to work.
To reproduce
Clone Open3D and create compilation database for c2s:
This creates
compile_commands.json
compilation database. Next try to use this to convert any CUDA file to SYCL:Errors:
Environment
OS: Ubuntu 22.04
c2s --version
clang --version
c++ --version
sycl-ls --verbose