diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index a60093e81..884a58b3d 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -467,10 +467,6 @@ if (GGML_SYCL) message(FATAL_ERROR "Invalid backend chosen, supported options are INTEL or NVIDIA") endif() - if (GGML_SYCL_TARGET STREQUAL "INTEL") - find_package(MKL REQUIRED) - endif() - check_cxx_compiler_flag("-fsycl" SUPPORTS_SYCL) if ( DEFINED ENV{ONEAPI_ROOT}) message(STATUS "Using oneAPI Release SYCL compiler (icpx).") @@ -484,7 +480,6 @@ if (GGML_SYCL) message(STATUS "SYCL found") #todo: AOT - list(APPEND GGML_CDEF_PUBLIC GGML_USE_SYCL) if (GGML_SYCL_F16) @@ -511,6 +506,7 @@ if (GGML_SYCL) if (WIN32) find_package(IntelSYCL REQUIRED) + find_package(MKL REQUIRED) set(GGML_EXTRA_LIBS ${GGML_EXTRA_LIBS} IntelSYCL::SYCL_CXX MKL::MKL MKL::MKL_SYCL) else() if (GGML_SYCL_TARGET STREQUAL "INTEL")