Skip to content

Commit d24f981

Browse files
authored
sycl: fix example build (#2570)
1 parent 01d3bd7 commit d24f981

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

examples/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if (WHISPER_SDL2)
137137
set_target_properties(lsp PROPERTIES FOLDER "examples")
138138
if (GGML_SYCL)
139139
add_subdirectory(sycl)
140-
set_target_properties(sycl PROPERTIES FOLDER "examples")
140+
set_target_properties(ls-sycl-device PROPERTIES FOLDER "examples")
141141
endif()
142142
endif (WHISPER_SDL2)
143143
endif()

examples/sycl/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
set(TARGET ls-sycl-device)
66
add_executable(${TARGET} ls-sycl-device.cpp)
77
install(TARGETS ${TARGET} RUNTIME)
8-
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
9-
target_compile_features(${TARGET} PRIVATE cxx_std_17)
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

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ cd build
77
source /opt/intel/oneapi/setvars.sh
88

99
#for FP16
10-
#cmake .. -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DWHISPER_SYCL_F16=ON # faster for long-prompt inference
10+
#cmake .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DWHISPER_SYCL_F16=ON # faster for long-prompt inference
1111

1212
#for FP32
13-
cmake .. -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
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
1417

1518
#build example/main only
1619
#cmake --build . --config Release --target main
1720

1821
#build all binary
19-
cmake --build . --config Release -v
22+
cmake --build . --config Release -v

0 commit comments

Comments
 (0)