mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-28 20:11:22 +00:00
upgrade emsdk to 3.1.19 (#12690)
* upgrade emsdk to 3.1.19 * fix build break * ignore '-Wunused-but-set-variable' in eigen * add malloc and free in exported functions * EXPORTED_FUNCTIONS
This commit is contained in:
parent
1a402a3f25
commit
82a28cc2c3
9 changed files with 28 additions and 8 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -58,7 +58,7 @@
|
|||
[submodule "cmake/external/emsdk"]
|
||||
path = cmake/external/emsdk
|
||||
url = https://github.com/emscripten-core/emsdk.git
|
||||
branch = 3.1.3
|
||||
branch = 3.1.19
|
||||
[submodule "cmake/external/onnxruntime-extensions"]
|
||||
path = cmake/external/onnxruntime-extensions
|
||||
url = https://github.com/microsoft/onnxruntime-extensions.git
|
||||
|
|
|
|||
|
|
@ -1131,6 +1131,8 @@ else()
|
|||
check_cxx_compiler_flag(-Wundefined-var-template HAS_UNDEFINED_VAR_TEMPLATE)
|
||||
check_cxx_compiler_flag(-Wformat-truncation HAS_FORMAT_TRUNCATION)
|
||||
check_cxx_compiler_flag(-Wbitwise-instead-of-logical HAS_BITWISE_INSTEAD_OF_LOGICAL)
|
||||
check_cxx_compiler_flag(-Wenum-constexpr-conversion HAS_ENUM_CONSTEXPR_CONVERSION)
|
||||
check_cxx_compiler_flag(-Wdeprecated-builtins HAS_DEPRECATED_BUILTINS)
|
||||
|
||||
if (HAS_TAUTOLOGICAL_POINTER_COMPARE)
|
||||
#we may have extra null pointer checkings in debug build, it's not an issue
|
||||
|
|
@ -1150,6 +1152,13 @@ else()
|
|||
if (HAS_UNDEFINED_VAR_TEMPLATE)
|
||||
list(APPEND ORT_WARNING_FLAGS -Wno-undefined-var-template)
|
||||
endif()
|
||||
if (HAS_DEPRECATED_BUILTINS)
|
||||
list(APPEND ORT_WARNING_FLAGS -Wno-deprecated-builtins)
|
||||
endif()
|
||||
|
||||
if (HAS_ENUM_CONSTEXPR_CONVERSION)
|
||||
target_compile_options(${PROTOBUF_LIB} PRIVATE "-Wno-enum-constexpr-conversion")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#names in this var must match the directory names under onnxruntime/core/providers
|
||||
|
|
|
|||
2
cmake/external/emsdk
vendored
2
cmake/external/emsdk
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit fc645b7626ebf86530dbd82fbece74d457e7ae07
|
||||
Subproject commit c220895fd1163c01f0a8b44229fb9e4fe0ae0958
|
||||
|
|
@ -189,6 +189,7 @@ else()
|
|||
|
||||
set_target_properties(onnxruntime_webassembly PROPERTIES LINK_FLAGS " \
|
||||
-s \"EXPORTED_RUNTIME_METHODS=${EXPORTED_RUNTIME_METHODS}\" \
|
||||
-s \"EXPORTED_FUNCTIONS=_malloc,_free\" \
|
||||
-s WASM=1 \
|
||||
-s NO_EXIT_RUNTIME=0 \
|
||||
-s ALLOW_MEMORY_GROWTH=1 \
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@
|
|||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
// cmake/external/eigen\Eigen/CXX11/src/Tensor/TensorTrace.h:130:9:
|
||||
// error: variable 'num_distinct_reduce_dims' set but not used [-Werror,-Wunused-but-set-variable]
|
||||
// int num_distinct_reduce_dims = 0;
|
||||
#ifdef HAS_UNUSED_BUT_SET_VARIABLE
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
// build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76):
|
||||
// warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence
|
||||
|
|
|
|||
|
|
@ -264,10 +264,6 @@ void UniDirectionalAttnLstm<T>::Compute(const gsl::span<const T>& inputs_arg,
|
|||
|
||||
DumpMatrix("Xt*(W[iofc]^T)", output_iofc_.data(), total_rows, hidden_size_x4);
|
||||
|
||||
int fused_hidden_rows = batch_size_ / hidden_num_threads_;
|
||||
if (batch_size_ % hidden_num_threads_ != 0)
|
||||
fused_hidden_rows++;
|
||||
|
||||
// NOTE: we could refine the bounds checking in the calls below that use these values to instead
|
||||
// explicitly check just the range for each iteration, however if it's going to run over
|
||||
// it should also run over on the last iteration, so this should be good enough to catch any
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@
|
|||
#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||
#endif
|
||||
|
||||
// cmake/external/eigen\Eigen/src/SparseCore/TriangularSolver.h:273:13:
|
||||
// error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
|
||||
// Index count = 0;
|
||||
#ifdef HAS_UNUSED_BUT_SET_VARIABLE
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#endif
|
||||
|
||||
#ifdef HAS_DEPRECATED_DECLARATIONS
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -384,7 +384,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.3", help="Specify version of emsdk")
|
||||
parser.add_argument("--emsdk_version", default="3.1.19", 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")
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
variables:
|
||||
EnvSetupScript: setup_env.bat
|
||||
buildArch: x64
|
||||
CommonBuildArgs: '--config ${{ parameters.BuildConfig }} --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wasm --emsdk_version releases-upstream-2ddc66235392b37e5b33477fd86cbe01a14b8aa2-64bit ${{ parameters.ExtraBuildArgs }}'
|
||||
CommonBuildArgs: '--config ${{ parameters.BuildConfig }} --skip_submodule_sync --cmake_generator "Visual Studio 16 2019" --build_wasm --emsdk_version releases-upstream-4c3772879a04140298c3abde90962d5567b5e2fc-64bit ${{ parameters.ExtraBuildArgs }}'
|
||||
runCodesignValidationInjection: false
|
||||
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
|
||||
workspace:
|
||||
|
|
|
|||
Loading…
Reference in a new issue