Skip to content

Commit ae9aa69

Browse files
committed
add comment explaining the cmake change
1 parent ab8f044 commit ae9aa69

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ggml/src/ggml-sycl/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,19 @@ target_compile_options(ggml-sycl PRIVATE "-Wno-narrowing")
5151
# Link against oneDNN
5252
set(GGML_SYCL_DNNL 0)
5353
if(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)

0 commit comments

Comments
 (0)