mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-02 03:55:34 +00:00
optimize web assembly build flags for multi-thread (#10759)
This commit is contained in:
parent
c8ec7782bd
commit
745fa5885f
2 changed files with 2 additions and 10 deletions
|
|
@ -312,7 +312,7 @@ endif()
|
|||
|
||||
if (onnxruntime_BUILD_WEBASSEMBLY)
|
||||
# Enable LTO for release single-thread build
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT onnxruntime_ENABLE_WEBASSEMBLY_THREADS)
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# NOTES:
|
||||
# (1) LTO does not work for WebAssembly multi-thread. (segment fault in worker)
|
||||
# (2) "-flto=thin" does not work correctly for wasm-ld.
|
||||
|
|
|
|||
|
|
@ -669,15 +669,7 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
if (onnxruntime_BUILD_WEBASSEMBLY)
|
||||
if (onnxruntime_ENABLE_WEBASSEMBLY_THREADS)
|
||||
# WebAssembly threading support in node is an experimental feature yet
|
||||
# and that makes some intensive threadpool tests fail randomly.
|
||||
# Will enable this test when node.js releases a stable version supporting multi-threads.
|
||||
list(REMOVE_ITEM all_tests
|
||||
"${TEST_SRC_DIR}/platform/threadpool_test.cc"
|
||||
"${TEST_SRC_DIR}/providers/cpu/nn/string_normalizer_test.cc"
|
||||
)
|
||||
else()
|
||||
if (NOT onnxruntime_ENABLE_WEBASSEMBLY_THREADS)
|
||||
list(REMOVE_ITEM all_tests
|
||||
"${TEST_SRC_DIR}/framework/execution_frame_test.cc"
|
||||
"${TEST_SRC_DIR}/framework/inference_session_test.cc"
|
||||
|
|
|
|||
Loading…
Reference in a new issue