Skip to content

Commit 1449214

Browse files
authored
enable dpcpp nightly builds with libraries (#13406)
1 parent c104023 commit 1449214

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ggml/src/ggml-sycl/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ target_compile_options(ggml-sycl PRIVATE "-Wno-narrowing")
5252
find_package(DNNL)
5353
set(GGML_SYCL_DNNL 0)
5454
if(DNNL_FOUND)
55-
if (DEFINED ENV{ONEAPI_ROOT} AND NOT DEFINED DNNL_GPU_VENDOR)
56-
# Assuming oneDNN packaged with oneapi release is used which
57-
# supports only intel target
55+
if (NOT DEFINED DNNL_GPU_VENDOR)
56+
# default to intel target
5857
set(DNNL_GPU_VENDOR "INTEL")
5958
if(NOT "${GGML_SYCL_TARGET}" STREQUAL "INTEL")
6059
message(WARNING "oneDNN builds bundled with oneapi release only support INTEL target")
@@ -108,6 +107,9 @@ endif()
108107
if (GGML_SYCL_TARGET STREQUAL "INTEL")
109108
# Intel devices use Intel oneMKL directly instead of oneMath to avoid the limitation of linking Intel oneMKL statically
110109
# See https://github.com/uxlfoundation/oneMath/issues/654
110+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
111+
set(SYCL_COMPILER ON)
112+
endif()
111113
find_package(MKL REQUIRED)
112114
target_link_libraries(ggml-sycl PRIVATE MKL::MKL_SYCL::BLAS)
113115
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_USE_INTEL_ONEMKL)

0 commit comments

Comments
 (0)