Skip to content

Commit 46b5c98

Browse files
committed
Use oneMath on non-WIN32
1 parent f0d46ef commit 46b5c98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ggml/src/ggml-sycl/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ if (GGML_SYCL_GRAPH)
104104
endif()
105105

106106
# Link against Intel oneMKL or oneMath
107-
if (GGML_SYCL_TARGET STREQUAL "INTEL")
108-
# Intel devices use Intel oneMKL directly instead of oneMath to avoid the limitation of linking Intel oneMKL statically
107+
find_package(oneMath)
108+
if (WIN32 AND NOT oneMath_FOUND AND GGML_SYCL_TARGET STREQUAL "INTEL")
109+
# Intel devices on WIN32 use Intel oneMKL directly instead of oneMath to avoid the limitation of linking Intel oneMKL statically
109110
# See https://github.com/uxlfoundation/oneMath/issues/654
110111
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
111112
set(SYCL_COMPILER ON)
@@ -114,7 +115,6 @@ if (GGML_SYCL_TARGET STREQUAL "INTEL")
114115
target_link_libraries(ggml-sycl PRIVATE MKL::MKL_SYCL::BLAS)
115116
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_USE_INTEL_ONEMKL)
116117
else()
117-
find_package(oneMath QUIET)
118118
if (NOT oneMath_FOUND)
119119
message(STATUS "oneMath not found: oneMath will be automatically downloaded")
120120
# Use FetchContent to automatically pull and build oneMath

0 commit comments

Comments
 (0)