mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	[SYCL] Fix win build conflict of math library (#8230)
* fix win build conflict of math library * fix the condition: !(win32 & SYCL) * revert warp_size=16
This commit is contained in:
		| @@ -19,6 +19,7 @@ | |||||||
|         "cacheVariables": { |         "cacheVariables": { | ||||||
|             "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", |             "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", | ||||||
|             "CMAKE_CXX_COMPILER": "icx", |             "CMAKE_CXX_COMPILER": "icx", | ||||||
|  |             "CMAKE_C_COMPILER": "cl", | ||||||
|             "GGML_SYCL": "ON", |             "GGML_SYCL": "ON", | ||||||
|             "CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.." |             "CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.." | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -490,7 +490,7 @@ if (GGML_SYCL) | |||||||
|         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl-targets=nvptx64-nvidia-cuda") |         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl-targets=nvptx64-nvidia-cuda") | ||||||
|         add_compile_definitions(GGML_SYCL_WARP_SIZE=32) |         add_compile_definitions(GGML_SYCL_WARP_SIZE=32) | ||||||
|     else() |     else() | ||||||
|         add_compile_definitions(GGML_SYCL_WARP_SIZE=16) |         add_compile_definitions(GGML_SYCL_WARP_SIZE=32) | ||||||
|     endif() |     endif() | ||||||
|  |  | ||||||
|     file(GLOB   GGML_HEADERS_SYCL "ggml-sycl/*.hpp") |     file(GLOB   GGML_HEADERS_SYCL "ggml-sycl/*.hpp") | ||||||
| @@ -1168,7 +1168,9 @@ target_link_libraries(ggml PRIVATE Threads::Threads ${GGML_EXTRA_LIBS}) | |||||||
|  |  | ||||||
| find_library(MATH_LIBRARY m) | find_library(MATH_LIBRARY m) | ||||||
| if (MATH_LIBRARY) | if (MATH_LIBRARY) | ||||||
|     target_link_libraries(ggml PRIVATE ${MATH_LIBRARY}) |     if (NOT WIN32 OR NOT GGML_SYCL) | ||||||
|  |         target_link_libraries(ggml PRIVATE ${MATH_LIBRARY}) | ||||||
|  |     endif() | ||||||
| endif() | endif() | ||||||
|  |  | ||||||
| if (BUILD_SHARED_LIBS) | if (BUILD_SHARED_LIBS) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 luoyu-intel
					luoyu-intel