File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
onnxruntime/core/mlas/lib Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ option(onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO "Enable this option to turn on
206206option (onnxruntime_ENABLE_WEBASSEMBLY_PROFILING "Enable this option to turn on WebAssembly profiling and preserve function names" OFF )
207207option (onnxruntime_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL "Enable this option to allow WebAssembly to output optimized model" OFF )
208208option (onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64 "Enable this option to allow WebAssembly to use 64bit memory" OFF )
209+ option (onnxruntime_ENABLE_WEBASSEMBLY_RELAXED_SIMD "Enable WebAssembly Relaxed SIMD" OFF )
209210
210211# Enable bitcode for iOS
211212option (onnxruntime_ENABLE_BITCODE "Enable bitcode for iOS only" OFF )
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ function(setup_mlas_source_for_windows)
236236endfunction ()
237237
238238if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" )
239- if (onnxruntime_ENABLE_WEBASSEMBLY_SIMD OR onnxruntime_ENABLE_WEBASSEMBLY_RELAXED_SIMD )
239+ if (onnxruntime_ENABLE_WEBASSEMBLY_SIMD)
240240 file (GLOB_RECURSE mlas_platform_srcs
241241 "${MLAS_SRC_DIR} /wasm_simd/*.cpp"
242242 )
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ Licensed under the MIT License.
66
77Module Name:
88
9- qgemm_kernel_wasmsimd .cpp
9+ qgemm_kernel_wasmrelaxedsimd .cpp
1010
1111Abstract:
1212
13- This module implements QGEMM kernel for WebAssembly SIMD128.
13+ This module implements QGEMM kernel for WebAssembly Relaxed SIMD128.
1414
1515--*/
1616
Original file line number Diff line number Diff line change @@ -1156,9 +1156,12 @@ def generate_build_tree(
11561156 cmake_args .append ("-Donnxruntime_DNNL_ACL_ROOT=" + args .dnnl_acl_root )
11571157 if args .build_wasm :
11581158 cmake_args .append ("-Donnxruntime_ENABLE_WEBASSEMBLY_SIMD=" + ("ON" if args .enable_wasm_simd else "OFF" ))
1159- cmake_args .append (
1160- "-Donnxruntime_ENABLE_WEBASSEMBLY_RELAXED_SIMD=" + ("ON" if args .enable_wasm_relaxed_simd else "OFF" )
1161- )
1159+ if args .enable_wasm_relaxed_simd :
1160+ if not args .enable_wasm_simd :
1161+ raise BuildError (
1162+ "Wasm Relaxed SIMD (--enable_wasm_relaxed_simd) is only available with Wasm SIMD (--enable_wasm_simd)."
1163+ )
1164+ cmake_args += ["-Donnxruntime_ENABLE_WEBASSEMBLY_RELAXED_SIMD=ON" ]
11621165 if args .use_migraphx :
11631166 cmake_args .append ("-Donnxruntime_MIGRAPHX_HOME=" + migraphx_home )
11641167 if args .use_cuda :
You can’t perform that action at this time.
0 commit comments