ONNX 1.21.0 integration
Merged
TI
7mo ago+1050+1050+0123456789012345678901234567890123456789-51-51-01234567890123456789
Fix https://github.com/microsoft/onnxruntime/issues/27586
This pull request updates ONNX Runtime to support ONNX opset 26, including new operator implementations and related infrastructure changes. The most important changes are the upgrade of the ONNX dependency, addition of new opset 26 kernels (such as CumProd and BitCast), and updates to macros and versioning to ensure compatibility. Below are the key changes grouped by theme:
ONNX Dependency Upgrade:
- Updated ONNX submodule and source references to the latest commit supporting opset 26, and changed versioning in
vcpkg.jsonfrom 1.20.1 to 1.21.0. (cmake/deps.txt,cmake/external/onnx,cmake/vcpkg-ports/onnx/portfile.cmake,cmake/vcpkg-ports/onnx/vcpkg.json) [1] [2] [3] [4]
Opset 26 Kernel Support:
- Registered new opset 26 kernels for
BitCastand all supported types ofCumProdin the CPU execution provider, including their instantiation and build logic. (onnxruntime/core/providers/cpu/cpu_execution_provider.cc,onnxruntime/core/providers/cpu/math/cumprod.cc,onnxruntime/core/providers/cpu/math/cumprod.h) [1] [2] [3] [4] - Increased the maximum supported opset version in the optimizer API from 25 to 26. (
onnxruntime/core/optimizer/transpose_optimization/optimizer_api.h)
Build and Patch Updates:
- Added a new
ONNX_MINIMAL_BUILDoption to ONNX CMake configuration and updated patch files for compatibility with the new ONNX version. (cmake/patches/onnx/onnx.patch,cmake/vcpkg-ports/onnx/binskim.patch) [1] [2] [3]
Macro Improvements:
- Updated operator schema macros to use
[[maybe_unused]]instead of the deprecatedONNX_UNUSEDattribute, improving code clarity and modernizing macro usage. (onnxruntime/core/graph/contrib_ops/contrib_defs.h,onnxruntime/core/graph/dml_ops/dml_defs.h) [1] [2]
ONNX Dependency Upgrade
- Updated ONNX submodule and source references to the latest commit supporting opset 26, and changed versioning in
vcpkg.jsonfrom 1.20.1 to 1.21.0. [1] [2] [3] [4]
Opset 26 Kernel Support
- Registered new opset 26 kernels for
BitCastand all supported types ofCumProdin the CPU execution provider, including their instantiation and build logic. [1] [2] [3] [4] - Increased the maximum supported opset version in the optimizer API from 25 to 26.
Build and Patch Updates
- Added a new
ONNX_MINIMAL_BUILDoption to ONNX CMake configuration and updated patch files for compatibility with the new ONNX version. [1] [2] [3]
Macro Improvements