[wasm] upgrade emsdk from 3.1.19 to 3.1.32 (#14818)

### Description
upgrade emsdk from 3.1.19 to 3.1.32

also add explicit config for stack size (1MB).
This commit is contained in:
Yulong Wang 2023-02-28 11:06:09 -08:00 committed by GitHub
parent 95c777b745
commit 69c5edb11b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 38 deletions

2
.gitmodules vendored
View file

@ -13,7 +13,7 @@
[submodule "cmake/external/emsdk"]
path = cmake/external/emsdk
url = https://github.com/emscripten-core/emsdk.git
branch = 3.1.19
branch = 3.1.32
[submodule "cmake/external/onnxruntime-extensions"]
path = cmake/external/onnxruntime-extensions
url = https://github.com/microsoft/onnxruntime-extensions.git

View file

@ -92,7 +92,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "c220895fd1163c01f0a8b44229fb9e4fe0ae0958",
"commitHash": "0ab19024f08c6673a713e454ef8bd95e174c807f",
"repositoryUrl": "https://github.com/emscripten-core/emsdk.git"
},
"comments": "git submodule at cmake/external/emsdk"
@ -328,16 +328,6 @@
"comments": "psimd"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "a20c65f2cd549445fda907f7b83894c8eb7427d6",
"repositoryUrl": "https://github.com/protocolbuffers/protobuf.git"
},
"comments": "protobuf"
}
},
{
"component": {
"type": "git",
@ -455,28 +445,7 @@
"commitHash": "75a84807a019bf4961faf713df9d748f0fc83b47",
"repositoryUrl": "https://github.com/triton-inference-server/server.git"
},
"comments": "triton server"
}
},
{
"component": {
"type": "git",
"git": {
"commitHash": "3712ec3f0426f7132d3759b84683d7d11e9ba683",
"repositoryUrl": "https://github.com/triton-inference-server/client.git"
},
"comments": "triton client"
}
},
{
"Component": {
"Type": "other",
"other": {
"Name": "pthread",
"Version": "3.0.0",
"DownloadUrl": "https://sourceforge.net/projects/pthreads4w/files/pthreads4w-code-v3.0.0.zip"
},
"comments": "posix pthread library"
"comments": "triton"
}
}
]

@ -1 +1 @@
Subproject commit c220895fd1163c01f0a8b44229fb9e4fe0ae0958
Subproject commit 0ab19024f08c6673a713e454ef8bd95e174c807f

View file

@ -835,7 +835,7 @@ if (onnxruntime_ENABLE_TRAINING_TORCH_INTEROP)
endif()
if (onnxruntime_BUILD_WEBASSEMBLY)
set_target_properties(onnxruntime_test_all PROPERTIES LINK_DEPENDS ${TEST_SRC_DIR}/wasm/onnxruntime_test_all_adapter.js)
set_target_properties(onnxruntime_test_all PROPERTIES LINK_FLAGS "-s ALLOW_MEMORY_GROWTH=1 --pre-js \"${TEST_SRC_DIR}/wasm/onnxruntime_test_all_adapter.js\" -s \"EXPORTED_RUNTIME_METHODS=['FS']\" --preload-file ${CMAKE_CURRENT_BINARY_DIR}/testdata@/testdata -s EXIT_RUNTIME=1")
set_target_properties(onnxruntime_test_all PROPERTIES LINK_FLAGS "-s STACK_SIZE=1048576 -s ALLOW_MEMORY_GROWTH=1 --pre-js \"${TEST_SRC_DIR}/wasm/onnxruntime_test_all_adapter.js\" -s \"EXPORTED_RUNTIME_METHODS=['FS']\" --preload-file ${CMAKE_CURRENT_BINARY_DIR}/testdata@/testdata -s EXIT_RUNTIME=1")
if (onnxruntime_ENABLE_WEBASSEMBLY_THREADS)
set_property(TARGET onnxruntime_test_all APPEND_STRING PROPERTY LINK_FLAGS " -s USE_PTHREADS=1 -s PROXY_TO_PTHREAD=1")
endif()

View file

@ -397,7 +397,7 @@ def parse_arguments():
# WebAssembly build
parser.add_argument("--build_wasm", action="store_true", help="Build for WebAssembly")
parser.add_argument("--build_wasm_static_lib", action="store_true", help="Build for WebAssembly static library")
parser.add_argument("--emsdk_version", default="3.1.19", help="Specify version of emsdk")
parser.add_argument("--emsdk_version", default="3.1.32", help="Specify version of emsdk")
parser.add_argument("--enable_wasm_simd", action="store_true", help="Enable WebAssembly SIMD")
parser.add_argument("--enable_wasm_threads", action="store_true", help="Enable WebAssembly multi-threads support")
@ -1222,6 +1222,9 @@ def generate_build_tree(
add_default_definition(emscripten_settings, "MALLOC", args.wasm_malloc)
add_default_definition(emscripten_settings, "MALLOC", "dlmalloc")
# set -s STACK_SIZE=1048576
add_default_definition(emscripten_settings, "STACK_SIZE", "1048576")
if emscripten_settings:
cmake_args += [f"-Donnxruntime_EMSCRIPTEN_SETTINGS={';'.join(emscripten_settings)}"]

View file

@ -29,7 +29,7 @@ jobs:
variables:
EnvSetupScript: setup_env.bat
buildArch: x64
CommonBuildArgs: '--parallel --config ${{ parameters.BuildConfig }} --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wasm --use_xnnpack --emsdk_version releases-upstream-4c3772879a04140298c3abde90962d5567b5e2fc-64bit ${{ parameters.ExtraBuildArgs }}'
CommonBuildArgs: '--parallel --config ${{ parameters.BuildConfig }} --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wasm --use_xnnpack --emsdk_version releases-29ad1037cd6b99e5d8a1bd75bc188c1e9a6fda8d-64bit ${{ parameters.ExtraBuildArgs }}'
runCodesignValidationInjection: false
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
workspace: