Skip to content

Commit fabee87

Browse files
committed
Add CMake configuration to use Visual Studio project to build ggml-sycl
1 parent e39e727 commit fabee87

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ggml/src/ggml-sycl/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,19 @@ if (GGML_SYCL_GRAPH)
9595
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_GRAPH)
9696
endif()
9797

98+
if (WIN32)
99+
if( ${CMAKE_GENERATOR} MATCHES "Visual Studio" AND NOT (${CMAKE_GENERATOR_TOOLSET} MATCHES "Intel C"))
100+
set_target_properties(ggml-sycl PROPERTIES VS_PLATFORM_TOOLSET "Intel C++ Compiler 2025")
101+
set(CMAKE_CXX_COMPILER "icx")
102+
set(CMAKE_CXX_COMPILER_ID "IntelLLVM")
103+
endif()
104+
endif()
105+
98106
# Link against Intel oneMKL or oneMath
99107
if (GGML_SYCL_TARGET STREQUAL "INTEL")
100108
# Intel devices use Intel oneMKL directly instead of oneMath to avoid the limitation of linking Intel oneMKL statically
101109
# See https://github.com/uxlfoundation/oneMath/issues/654
110+
find_package(IntelSYCL REQUIRED)
102111
find_package(MKL REQUIRED)
103112
target_link_libraries(ggml-sycl PRIVATE MKL::MKL_SYCL::BLAS)
104113
target_compile_definitions(ggml-sycl PRIVATE GGML_SYCL_USE_INTEL_ONEMKL)

0 commit comments

Comments
 (0)