File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,19 @@ target_compile_options(ggml-sycl PRIVATE "-Wno-narrowing")
5151# Link against oneDNN
5252set (GGML_SYCL_DNNL 0)
5353if (GGML_SYCL_DNN)
54+
55+ # The nightly dpcpp compiler recently stopped shipping libOpenCL
56+ # When using a nightly build of oneDNN built with the said nightly compiler, it links against the target OpenCL::OpenCL
57+ # For context,this line in the oneDNN CMake:
58+ # https://github.com/uxlfoundation/oneDNN/blob/743e4273d18bcb0e733723bf9289f14e8366687f/cmake/SYCL.cmake#L127
59+ # and when using this build of oneDNN in llama, it would expect the target OpenCL::OpenCL to be available.
60+ # Hence the below find_package call is required. At the time of writing, the release compiler
61+ # ships libOpenCL,hence only finding the package when the compiler is clang (nightly).
62+
5463 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
5564 find_package (OpenCL REQUIRED)
5665 endif ()
66+
5767 find_package (DNNL)
5868 if (DNNL_FOUND)
5969 if (NOT DEFINED DNNL_GPU_VENDOR)
You can’t perform that action at this time.
0 commit comments