From b8fe558322f9ddd954c708e7e9853764a1aa5cb1 Mon Sep 17 00:00:00 2001 From: Stefan Sydow Date: Fri, 8 Nov 2024 22:13:29 +0100 Subject: [PATCH] sycl: fix example build --- examples/CMakeLists.txt | 2 +- examples/sycl/CMakeLists.txt | 4 ++-- examples/sycl/build.sh | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 33e6249e8c1..8b37e5a527b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -137,7 +137,7 @@ if (WHISPER_SDL2) set_target_properties(lsp PROPERTIES FOLDER "examples") if (GGML_SYCL) add_subdirectory(sycl) - set_target_properties(sycl PROPERTIES FOLDER "examples") + set_target_properties(ls-sycl-device PROPERTIES FOLDER "examples") endif() endif (WHISPER_SDL2) endif() diff --git a/examples/sycl/CMakeLists.txt b/examples/sycl/CMakeLists.txt index 3b5721f9396..6f647736ce0 100644 --- a/examples/sycl/CMakeLists.txt +++ b/examples/sycl/CMakeLists.txt @@ -5,5 +5,5 @@ set(TARGET ls-sycl-device) add_executable(${TARGET} ls-sycl-device.cpp) install(TARGETS ${TARGET} RUNTIME) -target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT}) -target_compile_features(${TARGET} PRIVATE cxx_std_17) \ No newline at end of file +target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT}) +target_compile_features(${TARGET} PRIVATE cxx_std_17) diff --git a/examples/sycl/build.sh b/examples/sycl/build.sh index 87c3778f323..0a7e7c18427 100644 --- a/examples/sycl/build.sh +++ b/examples/sycl/build.sh @@ -7,13 +7,16 @@ cd build source /opt/intel/oneapi/setvars.sh #for FP16 -#cmake .. -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DWHISPER_SYCL_F16=ON # faster for long-prompt inference +#cmake .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DWHISPER_SYCL_F16=ON # faster for long-prompt inference #for FP32 -cmake .. -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx +cmake .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx + +#for other features as examples as stream and talk add SDL2: +#cmake .. -DGGML_SYCL=ON -DWHISPER_SDL2=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx #build example/main only #cmake --build . --config Release --target main #build all binary -cmake --build . --config Release -v \ No newline at end of file +cmake --build . --config Release -v