mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-29 07:34:18 +01:00
cmake : fix sycl build (#9469)
* try fix sycl build * use CMAKE_CXX_FLAGS as a string variable --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
parent
b653b1e922
commit
228df2bc11
@ -539,8 +539,7 @@ if (GGML_SYCL)
|
|||||||
add_compile_definitions(GGML_SYCL_FORCE_MMQ)
|
add_compile_definitions(GGML_SYCL_FORCE_MMQ)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_link_options (-fsycl)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing -fsycl")
|
||||||
add_compile_options(-fsycl -Wno-narrowing)
|
|
||||||
|
|
||||||
if (GGML_SYCL_TARGET STREQUAL "NVIDIA")
|
if (GGML_SYCL_TARGET STREQUAL "NVIDIA")
|
||||||
add_compile_definitions(GGML_SYCL_WARP_SIZE=32)
|
add_compile_definitions(GGML_SYCL_WARP_SIZE=32)
|
||||||
@ -575,10 +574,13 @@ if (GGML_SYCL)
|
|||||||
if (GGML_SYCL_TARGET STREQUAL "INTEL")
|
if (GGML_SYCL_TARGET STREQUAL "INTEL")
|
||||||
list(APPEND GGML_EXTRA_LIBS OpenCL mkl_core pthread m dl mkl_sycl_blas mkl_intel_ilp64 mkl_tbb_thread)
|
list(APPEND GGML_EXTRA_LIBS OpenCL mkl_core pthread m dl mkl_sycl_blas mkl_intel_ilp64 mkl_tbb_thread)
|
||||||
elseif (GGML_SYCL_TARGET STREQUAL "NVIDIA")
|
elseif (GGML_SYCL_TARGET STREQUAL "NVIDIA")
|
||||||
add_compile_options(-fsycl-targets=nvptx64-nvidia-cuda)
|
list(APPEND CMAKE_CXX_FLAGS -fsycl-targets=nvptx64-nvidia-cuda)
|
||||||
list(APPEND GGML_EXTRA_LIBS pthread m dl onemkl)
|
list(APPEND GGML_EXTRA_LIBS pthread m dl onemkl)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if (${DNNL_FOUND} AND GGML_SYCL_TARGET STREQUAL "INTEL")
|
||||||
|
list(APPEND GGML_EXTRA_LIBS DNNL::dnnl)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (GGML_RPC)
|
if (GGML_RPC)
|
||||||
|
Loading…
Reference in New Issue
Block a user