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")
52
52
find_package (DNNL )
53
53
set (GGML_SYCL_DNNL 0 )
54
54
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
58
57
set (DNNL_GPU_VENDOR "INTEL" )
59
58
if (NOT "${GGML_SYCL_TARGET} " STREQUAL "INTEL" )
60
59
message (WARNING "oneDNN builds bundled with oneapi release only support INTEL target" )
@@ -108,6 +107,9 @@ endif()
108
107
if (GGML_SYCL_TARGET STREQUAL "INTEL" )
109
108
# Intel devices use Intel oneMKL directly instead of oneMath to avoid the limitation of linking Intel oneMKL statically
110
109
# See https://github.com/uxlfoundation/oneMath/issues/654
110
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
111
+ set (SYCL_COMPILER ON )
112
+ endif ()
111
113
find_package (MKL REQUIRED )
112
114
target_link_libraries (ggml-sycl PRIVATE MKL::MKL_SYCL::BLAS )
113
115
target_compile_definitions (ggml-sycl PRIVATE GGML_SYCL_USE_INTEL_ONEMKL )
You can’t perform that action at this time.
0 commit comments