Spaces:
Running
Running
Nicolò Scipione
commited on
Commit
·
27cbcc9
1
Parent(s):
1c89b7d
sycl: allow ggml-sycl configuration and compilation using Visual Studio project/solution (llama/12625)
Browse files
ggml/src/ggml-sycl/CMakeLists.txt
CHANGED
|
@@ -27,6 +27,15 @@ file(GLOB GGML_HEADERS_SYCL "*.hpp")
|
|
| 27 |
file(GLOB GGML_SOURCES_SYCL "*.cpp")
|
| 28 |
target_sources(ggml-sycl PRIVATE ${GGML_HEADERS_SYCL} ${GGML_SOURCES_SYCL})
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
find_package(IntelSYCL)
|
| 31 |
if (IntelSYCL_FOUND)
|
| 32 |
# Use oneAPI CMake when possible
|
|
|
|
| 27 |
file(GLOB GGML_SOURCES_SYCL "*.cpp")
|
| 28 |
target_sources(ggml-sycl PRIVATE ${GGML_HEADERS_SYCL} ${GGML_SOURCES_SYCL})
|
| 29 |
|
| 30 |
+
if (WIN32)
|
| 31 |
+
# To generate a Visual Studio solution, using Intel C++ Compiler for ggml-sycl is mandatory
|
| 32 |
+
if( ${CMAKE_GENERATOR} MATCHES "Visual Studio" AND NOT (${CMAKE_GENERATOR_TOOLSET} MATCHES "Intel C"))
|
| 33 |
+
set_target_properties(ggml-sycl PROPERTIES VS_PLATFORM_TOOLSET "Intel C++ Compiler 2025")
|
| 34 |
+
set(CMAKE_CXX_COMPILER "icx")
|
| 35 |
+
set(CMAKE_CXX_COMPILER_ID "IntelLLVM")
|
| 36 |
+
endif()
|
| 37 |
+
endif()
|
| 38 |
+
|
| 39 |
find_package(IntelSYCL)
|
| 40 |
if (IntelSYCL_FOUND)
|
| 41 |
# Use oneAPI CMake when possible
|