Spaces:
Running
Running
Stefan Sydow
commited on
sycl: fix example build (#2570)
Browse files- examples/CMakeLists.txt +1 -1
- examples/sycl/CMakeLists.txt +2 -2
- examples/sycl/build.sh +6 -3
examples/CMakeLists.txt
CHANGED
|
@@ -137,7 +137,7 @@ if (WHISPER_SDL2)
|
|
| 137 |
set_target_properties(lsp PROPERTIES FOLDER "examples")
|
| 138 |
if (GGML_SYCL)
|
| 139 |
add_subdirectory(sycl)
|
| 140 |
-
set_target_properties(sycl PROPERTIES FOLDER "examples")
|
| 141 |
endif()
|
| 142 |
endif (WHISPER_SDL2)
|
| 143 |
endif()
|
|
|
|
| 137 |
set_target_properties(lsp PROPERTIES FOLDER "examples")
|
| 138 |
if (GGML_SYCL)
|
| 139 |
add_subdirectory(sycl)
|
| 140 |
+
set_target_properties(ls-sycl-device PROPERTIES FOLDER "examples")
|
| 141 |
endif()
|
| 142 |
endif (WHISPER_SDL2)
|
| 143 |
endif()
|
examples/sycl/CMakeLists.txt
CHANGED
|
@@ -5,5 +5,5 @@
|
|
| 5 |
set(TARGET ls-sycl-device)
|
| 6 |
add_executable(${TARGET} ls-sycl-device.cpp)
|
| 7 |
install(TARGETS ${TARGET} RUNTIME)
|
| 8 |
-
target_link_libraries(${TARGET} PRIVATE common
|
| 9 |
-
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
|
|
|
| 5 |
set(TARGET ls-sycl-device)
|
| 6 |
add_executable(${TARGET} ls-sycl-device.cpp)
|
| 7 |
install(TARGETS ${TARGET} RUNTIME)
|
| 8 |
+
target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
|
| 9 |
+
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
examples/sycl/build.sh
CHANGED
|
@@ -7,13 +7,16 @@ cd build
|
|
| 7 |
source /opt/intel/oneapi/setvars.sh
|
| 8 |
|
| 9 |
#for FP16
|
| 10 |
-
#cmake .. -
|
| 11 |
|
| 12 |
#for FP32
|
| 13 |
-
cmake .. -
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
#build example/main only
|
| 16 |
#cmake --build . --config Release --target main
|
| 17 |
|
| 18 |
#build all binary
|
| 19 |
-
cmake --build . --config Release -v
|
|
|
|
| 7 |
source /opt/intel/oneapi/setvars.sh
|
| 8 |
|
| 9 |
#for FP16
|
| 10 |
+
#cmake .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DWHISPER_SYCL_F16=ON # faster for long-prompt inference
|
| 11 |
|
| 12 |
#for FP32
|
| 13 |
+
cmake .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
|
| 14 |
+
|
| 15 |
+
#for other features from the examples, e.g. stream and talk link with SDL2:
|
| 16 |
+
#cmake .. -DGGML_SYCL=ON -DWHISPER_SDL2=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
|
| 17 |
|
| 18 |
#build example/main only
|
| 19 |
#cmake --build . --config Release --target main
|
| 20 |
|
| 21 |
#build all binary
|
| 22 |
+
cmake --build . --config Release -v
|