Skip to content

Commit ca3a04d

Browse files
committed
fix no simd build
1 parent f52546d commit ca3a04d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

examples/index.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@
2222
(async function () {
2323
// feature detect simd support
2424
// only if you need to support browsers/devices without simd support
25-
const createModule = (await simd())
26-
? createModuleSimd
27-
: createModuleNoSimd;
25+
const simdSupported = await simd();
26+
27+
if (simdSupported) {
28+
console.log("SIMD supported");
29+
var createModule = createModuleSimd;
30+
} else {
31+
console.log("SIMD not supported");
32+
var createModule = createModuleNoSimd;
33+
}
2834

2935
// Preload model
3036
const path = location.pathname.replace(/\/[^/]+$/, "");

shout.wasm/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ if (WHISPER_WASM_SINGLE_FILE)
2323
endif()
2424

2525
if (NO_SIMD)
26-
# remove -msimd128 set in whisper.cpp/ggml/src/CMakeList.txt to disable SIMD
27-
set_target_properties(ggml PROPERTIES COMPILE_FLAGS "")
26+
# remove -msimd128 set in whisper.cpp/ggml/src/ggml-cpu/CMakeList.txt:344 to disable SIMD
27+
set_target_properties(ggml-cpu PROPERTIES COMPILE_FLAGS "")
2828
endif()
2929

3030
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \

src/shout/shout.wasm_no-simd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)