From a8bb4684d07f923db2f7694b975c6837c8ff94a9 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:07:11 -0800 Subject: [PATCH 1/6] add option for reduced datatype in WebAssembly builds --- cmake/CMakeLists.txt | 5 ++++ .../op_kernel_type_control_overrides.inc | 30 +++++++++++++++++++ tools/ci_build/build.py | 1 + tools/ci_build/build_args.py | 5 ++++ 4 files changed, 41 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 11244e46b78a0..f398ed2855057 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -209,6 +209,7 @@ option(onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO "Enable this option to turn on option(onnxruntime_ENABLE_WEBASSEMBLY_PROFILING "Enable this option to turn on WebAssembly profiling and preserve function names" OFF) option(onnxruntime_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL "Enable this option to allow WebAssembly to output optimized model" OFF) option(onnxruntime_ENABLE_WEBASSEMBLY_RELAXED_SIMD "Enable WebAssembly Relaxed SIMD" OFF) +option(onnxruntime_WEBASSEMBLY_REDUCE_DATATYPE "Enable reduced datatype macro in WebAssembly builds" OFF) # Enable bitcode for iOS option(onnxruntime_ENABLE_BITCODE "Enable bitcode for iOS only" OFF) @@ -1751,6 +1752,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") message(STATUS "WebAssembly Build is enabled") list(APPEND ONNXRUNTIME_CMAKE_FILES onnxruntime_webassembly) + if (onnxruntime_WEBASSEMBLY_REDUCE_DATATYPE) + add_compile_definitions(ORT_WASM_REDUCE_DATATYPE) + endif() + if (onnxruntime_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL) add_compile_definitions(ORT_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL) endif() diff --git a/onnxruntime/core/providers/op_kernel_type_control_overrides.inc b/onnxruntime/core/providers/op_kernel_type_control_overrides.inc index 58019f3b772c4..8cd7f50d82224 100644 --- a/onnxruntime/core/providers/op_kernel_type_control_overrides.inc +++ b/onnxruntime/core/providers/op_kernel_type_control_overrides.inc @@ -42,6 +42,36 @@ namespace op_kernel_type_control { using types = ::onnxruntime::TypeList<__VA_ARGS__>; \ }; +// +// The following section is the default overrides for a reduced-size WebAssembly build. +// +#if defined(__wasm__) && defined(ORT_WASM_REDUCE_DATATYPE) +ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, Cast, Input, 0, + bool, + int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, + float, MLFloat16) + +ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, Scatter, Input, 0, + bool, + int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, + float, MLFloat16) + +ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, ScatterElements, Input, 0, + bool, + int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, + float, MLFloat16) + +ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, ScatterND, Input, 0, + bool, + int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, + float, MLFloat16) + +ORT_SPECIFY_OP_KERNEL_GLOBAL_ALLOWED_TYPES( + bool, + int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, + float, MLFloat16) +#endif // defined(__wasm__) && defined(ORT_WASM_REDUCE_DATATYPE) + // Examples: // Specify allowed types per Op kernel arg: // ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, Cast, Input, 0, float, int64_t); diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 05e1f96b7610c..33732c6eff937 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -504,6 +504,7 @@ def generate_build_tree( "-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=" + ("ON" if args.enable_wasm_threads else "OFF"), "-Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=" + ("ON" if args.enable_wasm_debug_info else "OFF"), "-Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=" + ("ON" if args.enable_wasm_profiling else "OFF"), + "-Donnxruntime_WEBASSEMBLY_REDUCE_DATATYPE=" + ("ON" if args.wasm_reduce_datatype else "OFF"), "-Donnxruntime_ENABLE_LAZY_TENSOR=" + ("ON" if args.enable_lazy_tensor else "OFF"), "-Donnxruntime_ENABLE_CUDA_PROFILING=" + ("ON" if args.enable_cuda_profiling else "OFF"), "-Donnxruntime_USE_XNNPACK=" + ("ON" if args.use_xnnpack else "OFF"), diff --git a/tools/ci_build/build_args.py b/tools/ci_build/build_args.py index f32666f65cc38..9ed6e4543fc23 100644 --- a/tools/ci_build/build_args.py +++ b/tools/ci_build/build_args.py @@ -372,6 +372,11 @@ def add_webassembly_args(parser: argparse.ArgumentParser) -> None: """Adds arguments for WebAssembly (WASM) platform builds.""" parser.add_argument("--build_wasm", action="store_true", help="Build for WebAssembly.") parser.add_argument("--build_wasm_static_lib", action="store_true", help="Build WebAssembly static library.") + parser.add_argument( + "--wasm_reduce_datatype", + action="store_true", + help="Enable WebAssembly reduced datatype support for kernel type control overrides.", + ) parser.add_argument("--emsdk_version", default="4.0.23", help="Specify version of emsdk.") parser.add_argument( "--enable_wasm_jspi", action="store_true", help="Enable WebAssembly JavaScript Promise Integration." From 4c3b5222b18137ad9b1e93a240a5a0702aafe3f1 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:26:59 -0800 Subject: [PATCH 2/6] use config --- cmake/CMakeLists.txt | 5 ---- .../op_kernel_type_control_overrides.inc | 30 ------------------- onnxruntime/wasm/reduced_types.config | 14 +++++++++ tools/ci_build/build.py | 1 - tools/ci_build/build_args.py | 5 ---- 5 files changed, 14 insertions(+), 41 deletions(-) create mode 100644 onnxruntime/wasm/reduced_types.config diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f398ed2855057..11244e46b78a0 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -209,7 +209,6 @@ option(onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO "Enable this option to turn on option(onnxruntime_ENABLE_WEBASSEMBLY_PROFILING "Enable this option to turn on WebAssembly profiling and preserve function names" OFF) option(onnxruntime_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL "Enable this option to allow WebAssembly to output optimized model" OFF) option(onnxruntime_ENABLE_WEBASSEMBLY_RELAXED_SIMD "Enable WebAssembly Relaxed SIMD" OFF) -option(onnxruntime_WEBASSEMBLY_REDUCE_DATATYPE "Enable reduced datatype macro in WebAssembly builds" OFF) # Enable bitcode for iOS option(onnxruntime_ENABLE_BITCODE "Enable bitcode for iOS only" OFF) @@ -1752,10 +1751,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") message(STATUS "WebAssembly Build is enabled") list(APPEND ONNXRUNTIME_CMAKE_FILES onnxruntime_webassembly) - if (onnxruntime_WEBASSEMBLY_REDUCE_DATATYPE) - add_compile_definitions(ORT_WASM_REDUCE_DATATYPE) - endif() - if (onnxruntime_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL) add_compile_definitions(ORT_ENABLE_WEBASSEMBLY_OUTPUT_OPTIMIZED_MODEL) endif() diff --git a/onnxruntime/core/providers/op_kernel_type_control_overrides.inc b/onnxruntime/core/providers/op_kernel_type_control_overrides.inc index 8cd7f50d82224..58019f3b772c4 100644 --- a/onnxruntime/core/providers/op_kernel_type_control_overrides.inc +++ b/onnxruntime/core/providers/op_kernel_type_control_overrides.inc @@ -42,36 +42,6 @@ namespace op_kernel_type_control { using types = ::onnxruntime::TypeList<__VA_ARGS__>; \ }; -// -// The following section is the default overrides for a reduced-size WebAssembly build. -// -#if defined(__wasm__) && defined(ORT_WASM_REDUCE_DATATYPE) -ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, Cast, Input, 0, - bool, - int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, - float, MLFloat16) - -ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, Scatter, Input, 0, - bool, - int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, - float, MLFloat16) - -ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, ScatterElements, Input, 0, - bool, - int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, - float, MLFloat16) - -ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, ScatterND, Input, 0, - bool, - int8_t, uint8_t, int32_t, uint32_t, int64_t, uint64_t, - float, MLFloat16) - -ORT_SPECIFY_OP_KERNEL_GLOBAL_ALLOWED_TYPES( - bool, - int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, - float, MLFloat16) -#endif // defined(__wasm__) && defined(ORT_WASM_REDUCE_DATATYPE) - // Examples: // Specify allowed types per Op kernel arg: // ORT_SPECIFY_OP_KERNEL_ARG_ALLOWED_TYPES(kOnnxDomain, Cast, Input, 0, float, int64_t); diff --git a/onnxruntime/wasm/reduced_types.config b/onnxruntime/wasm/reduced_types.config new file mode 100644 index 0000000000000..5e5ced7e759f4 --- /dev/null +++ b/onnxruntime/wasm/reduced_types.config @@ -0,0 +1,14 @@ +# Reduced type configuration for WebAssembly builds. +# This limits globally allowed types for all operators to reduce binary size (~230KB). +# See https://onnxruntime.ai/docs/reference/operators/reduced-operator-config-file.html +# +# Usage: pass to build.py via: +# --include_ops_by_config onnxruntime/wasm/reduced_types.config --enable_reduced_operator_type_support +# +# Excluded types: float4, float8, float64 (double), int16, uint16 + +# Keep all operators - only apply type reduction +!no_ops_specified_means_all_ops_are_required + +# Globally allowed types for all operators +!globally_allowed_types;bool,int8_t,uint8_t,int32_t,uint32_t,int64_t,uint64_t,float,MLFloat16 diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 33732c6eff937..05e1f96b7610c 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -504,7 +504,6 @@ def generate_build_tree( "-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=" + ("ON" if args.enable_wasm_threads else "OFF"), "-Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=" + ("ON" if args.enable_wasm_debug_info else "OFF"), "-Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=" + ("ON" if args.enable_wasm_profiling else "OFF"), - "-Donnxruntime_WEBASSEMBLY_REDUCE_DATATYPE=" + ("ON" if args.wasm_reduce_datatype else "OFF"), "-Donnxruntime_ENABLE_LAZY_TENSOR=" + ("ON" if args.enable_lazy_tensor else "OFF"), "-Donnxruntime_ENABLE_CUDA_PROFILING=" + ("ON" if args.enable_cuda_profiling else "OFF"), "-Donnxruntime_USE_XNNPACK=" + ("ON" if args.use_xnnpack else "OFF"), diff --git a/tools/ci_build/build_args.py b/tools/ci_build/build_args.py index 9ed6e4543fc23..f32666f65cc38 100644 --- a/tools/ci_build/build_args.py +++ b/tools/ci_build/build_args.py @@ -372,11 +372,6 @@ def add_webassembly_args(parser: argparse.ArgumentParser) -> None: """Adds arguments for WebAssembly (WASM) platform builds.""" parser.add_argument("--build_wasm", action="store_true", help="Build for WebAssembly.") parser.add_argument("--build_wasm_static_lib", action="store_true", help="Build WebAssembly static library.") - parser.add_argument( - "--wasm_reduce_datatype", - action="store_true", - help="Enable WebAssembly reduced datatype support for kernel type control overrides.", - ) parser.add_argument("--emsdk_version", default="4.0.23", help="Specify version of emsdk.") parser.add_argument( "--enable_wasm_jspi", action="store_true", help="Enable WebAssembly JavaScript Promise Integration." From b56d157e20adfb477e221c7f22a3a68ab87e457f Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Mon, 23 Feb 2026 23:19:47 -0800 Subject: [PATCH 3/6] update build script --- js/build_webgpu.bat | 3 ++- js/build_webgpu.sh | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/build_webgpu.bat b/js/build_webgpu.bat index d32a7ab1abb81..359365959a78e 100644 --- a/js/build_webgpu.bat +++ b/js/build_webgpu.bat @@ -69,7 +69,8 @@ popd set PATH=C:\Program Files\Git\usr\bin;%PATH% call %ROOT%build.bat --config %CONFIG% %CONFIG_EXTRA_FLAG% --skip_submodule_sync --build_wasm --target onnxruntime_webassembly --skip_tests^ - --enable_wasm_simd --enable_wasm_threads --use_webnn --use_webgpu --enable_wasm_jspi --build_dir %BUILD_DIR% + --enable_wasm_simd --enable_wasm_threads --use_webnn --use_webgpu --enable_wasm_jspi --build_dir %BUILD_DIR%^ + --include_ops_by_config %ROOT%onnxruntime\wasm\reduced_types.config --enable_reduced_operator_type_support IF NOT "%ERRORLEVEL%" == "0" ( exit /b %ERRORLEVEL% diff --git a/js/build_webgpu.sh b/js/build_webgpu.sh index ea12093c37cf7..1e9492d818680 100755 --- a/js/build_webgpu.sh +++ b/js/build_webgpu.sh @@ -101,7 +101,9 @@ echo "Calling $ROOT_DIR/build.sh to build WebAssembly..." --use_webnn \ --use_webgpu \ --enable_wasm_jspi \ - --build_dir "$BUILD_DIR" + --build_dir "$BUILD_DIR" \ + --include_ops_by_config "$ROOT_DIR/onnxruntime/wasm/reduced_types.config" \ + --enable_reduced_operator_type_support # The 'set -e' command at the beginning of the script ensures that the script will exit # immediately if the build.sh command (or any other command) fails. From 32454023a4f6dddb5f505dcee3bcf16dcf0d527f Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Tue, 24 Feb 2026 02:03:58 -0800 Subject: [PATCH 4/6] revise build bat --- js/build_jsep.bat | 17 +++++++++++++++-- js/build_webgpu.bat | 19 ++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/js/build_jsep.bat b/js/build_jsep.bat index ace96e978d934..fb94f0841ee01 100644 --- a/js/build_jsep.bat +++ b/js/build_jsep.bat @@ -64,8 +64,21 @@ popd set PATH=C:\Program Files\Git\usr\bin;%PATH% -call %ROOT%build.bat --config %CONFIG% %CONFIG_EXTRA_FLAG% --skip_submodule_sync --build_wasm --skip_tests^ - --enable_wasm_simd --enable_wasm_threads --use_jsep --use_webnn --target onnxruntime_webassembly --build_dir %BUILD_DIR% +call %ROOT%build.bat^ + --config %CONFIG%^ + %CONFIG_EXTRA_FLAG%^ + --parallel^ + --skip_submodule_sync^ + --build_wasm^ + --target onnxruntime_webassembly^ + --skip_tests^ + --enable_wasm_simd^ + --enable_wasm_threads^ + --use_jsep^ + --use_webnn^ + --build_dir %BUILD_DIR%^ + --include_ops_by_config %ROOT%onnxruntime\wasm\reduced_types.config^ + --enable_reduced_operator_type_support IF NOT "%ERRORLEVEL%" == "0" ( exit /b %ERRORLEVEL% diff --git a/js/build_webgpu.bat b/js/build_webgpu.bat index 359365959a78e..5d017edbfa22b 100644 --- a/js/build_webgpu.bat +++ b/js/build_webgpu.bat @@ -68,9 +68,22 @@ popd set PATH=C:\Program Files\Git\usr\bin;%PATH% -call %ROOT%build.bat --config %CONFIG% %CONFIG_EXTRA_FLAG% --skip_submodule_sync --build_wasm --target onnxruntime_webassembly --skip_tests^ - --enable_wasm_simd --enable_wasm_threads --use_webnn --use_webgpu --enable_wasm_jspi --build_dir %BUILD_DIR%^ - --include_ops_by_config %ROOT%onnxruntime\wasm\reduced_types.config --enable_reduced_operator_type_support +call %ROOT%build.bat^ + --config %CONFIG%^ + %CONFIG_EXTRA_FLAG%^ + --parallel^ + --skip_submodule_sync^ + --build_wasm^ + --target onnxruntime_webassembly^ + --skip_tests^ + --enable_wasm_simd^ + --enable_wasm_threads^ + --use_webnn^ + --use_webgpu^ + --enable_wasm_jspi^ + --build_dir %BUILD_DIR%^ + --include_ops_by_config %ROOT%onnxruntime\wasm\reduced_types.config^ + --enable_reduced_operator_type_support IF NOT "%ERRORLEVEL%" == "0" ( exit /b %ERRORLEVEL% From 6f041865d5bc83406e51eee943c6412da2330fe5 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Tue, 24 Feb 2026 02:18:56 -0800 Subject: [PATCH 5/6] update YML --- .../workflows/linux-wasm-ci-build-and-test-workflow.yml | 8 ++++++++ .../github/azure-pipelines/templates/linux-wasm-ci.yml | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml b/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml index e08ce13c6dd33..3139df81d4269 100644 --- a/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml +++ b/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml @@ -50,6 +50,12 @@ jobs: --enable_wasm_simd ${{ inputs.enable_wasm_threads == true && '--enable_wasm_threads' || '' }} ${{ inputs.extra_build_args }} + reduced_size_build_args: >- + --disable_ml_ops + --disable_generation_ops + --disable_types string float4 float8 optional sparsetensor + --include_ops_by_config onnxruntime/wasm/reduced_types.config + --enable_reduced_operator_type_support steps: - name: Checkout code @@ -109,6 +115,7 @@ jobs: --use_webnn \ --target onnxruntime_webassembly \ ${{ inputs.build_config == 'Release' && '--enable_wasm_api_exception_catching' || '' }} \ + ${{ env.reduced_size_build_args }} \ --skip_tests working-directory: ${{ github.workspace }} @@ -122,6 +129,7 @@ jobs: --use_webnn \ --enable_wasm_jspi \ --target onnxruntime_webassembly \ + ${{ env.reduced_size_build_args }} \ --skip_tests working-directory: ${{ github.workspace }} diff --git a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml index ef30a49b0fb83..15420bf905f9f 100644 --- a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml @@ -57,6 +57,7 @@ jobs: ExceptionHandlingBuildArgs: '--enable_wasm_api_exception_catching' ${{ else }}: ExceptionHandlingBuildArgs: '' + reducedSizeBuildArgs: '--disable_ml_ops --disable_generation_ops --disable_types string float4 float8 optional sparsetensor --include_ops_by_config $(Build.SourcesDirectory)/onnxruntime/wasm/reduced_types.config --enable_reduced_operator_type_support' runCodesignValidationInjection: false TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] ORT_CACHE_DIR: $(Agent.TempDirectory)/ort_ccache @@ -141,7 +142,7 @@ jobs: ${{ else }}: AdditionalKey: wasm_inferencing_webgpu | ${{ parameters.BuildConfig }} CacheDir: $(ORT_CACHE_DIR)/wasm_inferencing_webgpu - Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_webgpu --use_webgpu --use_webnn --target onnxruntime_webassembly $(ExceptionHandlingBuildArgs) --skip_tests' + Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_webgpu --use_webgpu --use_webnn --target onnxruntime_webassembly $(ExceptionHandlingBuildArgs) $(reducedSizeBuildArgs) --skip_tests' DisplayName: 'Build (simd + threads + WebGPU experimental)' WithCache: ${{ parameters.WithCache }} @@ -154,7 +155,7 @@ jobs: ${{ else }}: AdditionalKey: wasm_inferencing_webgpu_jspi | ${{ parameters.BuildConfig }} CacheDir: $(ORT_CACHE_DIR)/wasm_inferencing_webgpu_jspi - Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_webgpu_jspi --use_webgpu --use_webnn --enable_wasm_jspi --target onnxruntime_webassembly --skip_tests' + Arguments: '$(CommonBuildArgs) --build_dir $(Build.BinariesDirectory)/wasm_inferencing_webgpu_jspi --use_webgpu --use_webnn --enable_wasm_jspi --target onnxruntime_webassembly $(reducedSizeBuildArgs) --skip_tests' DisplayName: 'Build (simd + threads + WebGPU experimental, JSPI)' WithCache: ${{ parameters.WithCache }} From 01cd95e3fe646847cb64394144c9202f91d5bd6d Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Wed, 25 Feb 2026 01:28:49 +0000 Subject: [PATCH 6/6] fix build --- .github/workflows/linux-wasm-ci-build-and-test-workflow.yml | 3 +++ .../github/azure-pipelines/templates/linux-wasm-ci.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml b/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml index 3139df81d4269..4288442720493 100644 --- a/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml +++ b/.github/workflows/linux-wasm-ci-build-and-test-workflow.yml @@ -74,6 +74,9 @@ jobs: python-version: "3.12" architecture: ${{ env.buildArch }} + - name: Install python dependencies + run: python -m pip install flatbuffers + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.9 with: vcpkg-version: '2025.08.27' diff --git a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml index 15420bf905f9f..97e7a43a88824 100644 --- a/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/linux-wasm-ci.yml @@ -93,6 +93,9 @@ jobs: inputs: versionSpec: '22.x' + - script: python -m pip install flatbuffers + displayName: 'Install python dependencies' + - ${{if eq(parameters.WithCache, true)}}: - script: | set -ex