Closed mfbalin closed 4 years ago
[ 2%] Performing download step (git clone) for 'ocl-headers'
In file included from /home/mbalin3/sycl_workspace/llvm/sycl/include/CL/sycl/detail/pi.hpp:13,
from /home/mbalin3/sycl_workspace/llvm/sycl/plugins/cuda/pi_cuda.cpp:10:
/home/mbalin3/sycl_workspace/llvm/sycl/include/CL/sycl/detail/common.hpp:18:10: fatal error: CL/cl_ext_intel.h: No such file or directory
18 | #include <CL/cl_ext_intel.h>
| ^~~~~~~~~~~~~~~~~~~
It seems like we have missed dependencies for pi_cuda
target or they doesn't work as intended.
For example, for OpenCL PI Plugin we have:
For Cuda PI plugin we have:
@Ruyk, @Alexander-Johnston, could you please take a look?
@krasznaa is this the same issue you are seeing ?
It is. I've been compiling the HEAD of the code for the last few times with:
cmake ...
make ocl-headers
make -j<X>
:stuck_out_tongue: I was hoping that somebody would "magically" fix this at one point...
Something that seems to work for me is
diff --git a/sycl/plugins/cuda/CMakeLists.txt b/sycl/plugins/cuda/CMakeLists.txt
index bec6a2dd8ad..0b8b5e30233 100644
--- a/sycl/plugins/cuda/CMakeLists.txt
+++ b/sycl/plugins/cuda/CMakeLists.txt
@@ -21,6 +21,10 @@ add_library(pi_cuda SHARED
"pi_cuda.cpp"
)
+add_dependencies(pi_cuda
+ ocl-headers
+)
+
add_dependencies(sycl-toolchain pi_cuda)
set_target_properties(pi_cuda PROPERTIES LINKER_LANGUAGE CXX)
@krasznaa would you check if that fixes the build for you as well ?
commit 03326f70e3227fbb8121b3dffed264aad486b088 (HEAD -> sycl, origin/sycl, origin/HEAD)
Make fails the first time it is called after cmake but calling it again, it works without any issue. See the cmake and make output below, to see where the error is, search for "compilation terminated":