onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

Integration with ONNX==1.20.0

Open titaiwangms opened this issue 1 month ago • 3 comments

Description

NOTE: Need https://github.com/microsoft/onnxruntime/issues/26597

Motivation and Context

titaiwangms avatar Nov 14 '25 23:11 titaiwangms

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.

snnn avatar Nov 18 '25 23:11 snnn

filed an onnx bug: https://github.com/onnx/onnx/issues/7514

edgchen1 avatar Dec 11 '25 00:12 edgchen1

Need https://github.com/onnx/onnx/pull/7515

titaiwangms avatar Dec 11 '25 20:12 titaiwangms