diff --git a/.gitmodules b/.gitmodules index dc9ff85461..5a48626674 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index cc8a532001..fd277da4cd 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -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 diff --git a/cmake/external/emsdk b/cmake/external/emsdk index fc645b7626..c220895fd1 160000 --- a/cmake/external/emsdk +++ b/cmake/external/emsdk @@ -1 +1 @@ -Subproject commit fc645b7626ebf86530dbd82fbece74d457e7ae07 +Subproject commit c220895fd1163c01f0a8b44229fb9e4fe0ae0958 diff --git a/cmake/onnxruntime_webassembly.cmake b/cmake/onnxruntime_webassembly.cmake index ba1c7432c7..9093d17762 100644 --- a/cmake/onnxruntime_webassembly.cmake +++ b/cmake/onnxruntime_webassembly.cmake @@ -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 \ diff --git a/include/onnxruntime/core/common/eigen_common_wrapper.h b/include/onnxruntime/core/common/eigen_common_wrapper.h index 20a2757466..4515f80ffd 100644 --- a/include/onnxruntime/core/common/eigen_common_wrapper.h +++ b/include/onnxruntime/core/common/eigen_common_wrapper.h @@ -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 diff --git a/onnxruntime/contrib_ops/cpu/attnlstm/uni_dir_attn_lstm.cc b/onnxruntime/contrib_ops/cpu/attnlstm/uni_dir_attn_lstm.cc index f084e72dcd..a408a8f95c 100644 --- a/onnxruntime/contrib_ops/cpu/attnlstm/uni_dir_attn_lstm.cc +++ b/onnxruntime/contrib_ops/cpu/attnlstm/uni_dir_attn_lstm.cc @@ -264,10 +264,6 @@ void UniDirectionalAttnLstm::Compute(const gsl::span& 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 diff --git a/onnxruntime/core/util/math_cpuonly.h b/onnxruntime/core/util/math_cpuonly.h index 89fe2f61f1..f4fa3aa54b 100644 --- a/onnxruntime/core/util/math_cpuonly.h +++ b/onnxruntime/core/util/math_cpuonly.h @@ -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 diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index bd1e7dd5e5..6a42502b14 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -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") diff --git a/tools/ci_build/github/azure-pipelines/templates/win-wasm-ci.yml b/tools/ci_build/github/azure-pipelines/templates/win-wasm-ci.yml index e86abfbef7..c50a815312 100644 --- a/tools/ci_build/github/azure-pipelines/templates/win-wasm-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/win-wasm-ci.yml @@ -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: