File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,8 @@ target_compile_options(ggml-sycl PRIVATE "-Wno-narrowing")
5252find_package (DNNL)
5353set (GGML_SYCL_DNNL 0)
5454if (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()
108107if (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)
You can’t perform that action at this time.
0 commit comments