Skip to content

Conversation

@titaiwangms
Copy link
Contributor

@titaiwangms titaiwangms commented Nov 14, 2025

This pull request updates the ONNX dependency from version 1.19.1 to 1.20.1 across the build system, patches, and documentation. It ensures that all relevant files, patches, and metadata are consistent with the new ONNX version, and updates the operator documentation to reflect changes in ONNX opset versions.

ONNX Dependency Update:

  • Updated ONNX version from 1.19.1 to 1.20.1 in cmake/deps.txt, cmake/vcpkg-ports/onnx/vcpkg.json, and the submodule reference in cmake/external/onnx. Also updated the SHA512 in cmake/vcpkg-ports/onnx/portfile.cmake to match the new ONNX release. [1] [2] [3] [4]

Patch and Build System Synchronization:

  • Synchronized ONNX patches (cmake/patches/onnx/onnx.patch and cmake/vcpkg-ports/onnx/binskim.patch) to match the new ONNX version, including updates for minimal build options and source file exclusions. [1] [2]
  • Updated dependency handling for Protobuf in ONNX build patches to ensure compatibility with the new ONNX version. [1] [2]
  • Adjusted the onnxruntime_add_include_to_target call in cmake/onnxruntime_unittests.cmake to include ${PROTOBUF_LIB} for correct dependency propagation.

Documentation Updates:

  • Updated docs/OperatorKernels.md to reflect the new opset version for the Cast operator (now 25+) and added the previous version (24) for clarity.
  • Clarified the ONNX update process in docs/How_To_Update_ONNX_Dev_Notes.md to mention the importance of patch synchronization and SHA updates.

@titaiwangms titaiwangms added the dependencies Pull requests that update a dependency file label Nov 14, 2025
@titaiwangms titaiwangms linked an issue Nov 18, 2025 that may be closed by this pull request
@snnn
Copy link
Contributor

snnn commented Nov 18, 2025

There appears to be a gap in the vcpkg configuration for native Linux builds regarding the protobuf library version.

The generated triplet file (e.g., x64-linux.cmake) does not currently receive a setting for ONNX_USE_LITE_PROTO.

This is because the logic in tools/python/util/vcpkg_helpers.py that adds -DONNX_USE_LITE_PROTO=ON is specific to WebAssembly builds, as shown in the add_port_configs function:

    if is_emscripten:
        # Uses ONNX_USE_LITE_PROTO=ON for WebAssembly build.
        f.write(
            r"""
    list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
        "-DONNX_USE_LITE_PROTO=ON"
    )"""
        )

For native Linux builds, is_emscripten is False, so this block is skipped. As a result, the onnx dependency falls back to its default (ONNX_USE_LITE_PROTO=OFF), causing a mismatch with the ONNX Runtime default build which expects the lite version. This should be addressed to ensure native builds are configured correctly.

@titaiwangms titaiwangms reopened this Nov 26, 2025
@titaiwangms titaiwangms changed the title Integration with ONNX==1.20.0 Integration with ONNX==1.20.1 Jan 8, 2026
@titaiwangms
Copy link
Contributor Author

Need onnx/onnx#7515

Will integrate with 1.20.1

@titaiwangms titaiwangms added this to the 1.24.0 milestone Jan 8, 2026
@titaiwangms titaiwangms marked this pull request as ready for review January 9, 2026 16:55
@titaiwangms titaiwangms closed this Jan 9, 2026
@titaiwangms titaiwangms reopened this Jan 9, 2026
titaiwangms added a commit to onnx/onnx that referenced this pull request Jan 9, 2026
ONNXRUNTIME CI running:
microsoft/onnxruntime#26579

Signed-off-by: Ti-Tai Wang <[email protected]>
justinchuby
justinchuby previously approved these changes Jan 9, 2026
@titaiwangms titaiwangms enabled auto-merge (squash) January 12, 2026 16:28
@justinchuby
Copy link
Contributor

Does it still need #26597 ? Or does the PR description need update

@titaiwangms titaiwangms linked an issue Jan 12, 2026 that may be closed by this pull request
@titaiwangms
Copy link
Contributor Author

Does it still need #26597 ? Or does the PR description need update

Thanks. It's also included in this PR.

@titaiwangms titaiwangms merged commit de398c4 into main Jan 12, 2026
102 of 103 checks passed
@titaiwangms titaiwangms deleted the titaiwang/check_onnx_1_20 branch January 12, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Build] VCPKG build always set ONNX_USE_LITE_PROTO:BOOL=ON Integrate with ONNX 1.20.0 release branch

6 participants