ONNX 1.21.0 integration (#27601)
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.json` from 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]](diffhunk://#diff-12c22e06cbb37ea0ed9f9eaf60cbe408dbeef04072df6a9f431c3290822ea835L37-R37)
[[2]](diffhunk://#diff-9610cc34ae338fe4c5eeb890d8760392d918f49b9221dab12a0adcb4578f1f15L1-R1)
[[3]](diffhunk://#diff-6464fa440100374a194593fb273aa9320ff3b3b55ecae464f48726e7594c0a7bL6-R7)
[[4]](diffhunk://#diff-460c1544e72078765c253c50b5933395422dd8cd95666fdf93a99f1dcc56d699L3-R4)
**Opset 26 Kernel Support:**
* Registered new opset 26 kernels for `BitCast` and all supported types
of `CumProd` in 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]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908R1500-R1508)
[[2]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908R3673-R3681)
[[3]](diffhunk://#diff-2ed3b3c2a90656fcb37d29cc6e11b60013a205ac8507ce3eded9b900a124d6f1R1-R222)
[[4]](diffhunk://#diff-35021cf0759796ff8af4cd636161826fbafa369f7a326bd0aed7c5060e177921R1-R28)
* 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_BUILD` option 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]](diffhunk://#diff-c9c00bf16b95029cc65c186ad8254d2db0fef67de0049ab4a895172588c547aaL2-R13)
[[2]](diffhunk://#diff-c9c00bf16b95029cc65c186ad8254d2db0fef67de0049ab4a895172588c547aaL51-R54)
[[3]](diffhunk://#diff-c9c00bf16b95029cc65c186ad8254d2db0fef67de0049ab4a895172588c547aaL74-R77)
**Macro Improvements:**
* Updated operator schema macros to use `[[maybe_unused]]` instead of
the deprecated `ONNX_UNUSED` attribute, improving code clarity and
modernizing macro usage.
(`onnxruntime/core/graph/contrib_ops/contrib_defs.h`,
`onnxruntime/core/graph/dml_ops/dml_defs.h`)
[[1]](diffhunk://#diff-534f8d4a645c4fa2e80983b37196e601f7a69424e93bbcb4008a75d18427b8d6L39-R48)
[[2]](diffhunk://#diff-78f99ce10cbacc2195aaa4736129cdcb5fec7c381e826ebb04789dfbdd515903L15-R24)
---
**ONNX Dependency Upgrade**
- Updated ONNX submodule and source references to the latest commit
supporting opset 26, and changed versioning in `vcpkg.json` from 1.20.1
to 1.21.0.
[[1]](diffhunk://#diff-12c22e06cbb37ea0ed9f9eaf60cbe408dbeef04072df6a9f431c3290822ea835L37-R37)
[[2]](diffhunk://#diff-9610cc34ae338fe4c5eeb890d8760392d918f49b9221dab12a0adcb4578f1f15L1-R1)
[[3]](diffhunk://#diff-6464fa440100374a194593fb273aa9320ff3b3b55ecae464f48726e7594c0a7bL6-R7)
[[4]](diffhunk://#diff-460c1544e72078765c253c50b5933395422dd8cd95666fdf93a99f1dcc56d699L3-R4)
**Opset 26 Kernel Support**
- Registered new opset 26 kernels for `BitCast` and all supported types
of `CumProd` in the CPU execution provider, including their
instantiation and build logic.
[[1]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908R1500-R1508)
[[2]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908R3673-R3681)
[[3]](diffhunk://#diff-2ed3b3c2a90656fcb37d29cc6e11b60013a205ac8507ce3eded9b900a124d6f1R1-R222)
[[4]](diffhunk://#diff-35021cf0759796ff8af4cd636161826fbafa369f7a326bd0aed7c5060e177921R1-R28)
- Increased the maximum supported opset version in the optimizer API
from 25 to 26.
**Build and Patch Updates**
- Added a new `ONNX_MINIMAL_BUILD` option to ONNX CMake configuration
and updated patch files for compatibility with the new ONNX version.
[[1]](diffhunk://#diff-c9c00bf16b95029cc65c186ad8254d2db0fef67de0049ab4a895172588c547aaL2-R13)
[[2]](diffhunk://#diff-c9c00bf16b95029cc65c186ad8254d2db0fef67de0049ab4a895172588c547aaL51-R54)
[[3]](diffhunk://#diff-c9c00bf16b95029cc65c186ad8254d2db0fef67de0049ab4a895172588c547aaL74-R77)
**Macro Improvements**
- Updated operator schema macros to use `[[maybe_unused]]` instead of
the deprecated `ONNX_UNUSED` attribute, improving code clarity and
modernizing macro usage.
[[1]](diffhunk://#diff-534f8d4a645c4fa2e80983b37196e601f7a69424e93bbcb4008a75d18427b8d6L39-R48)
[[2]](diffhunk://#diff-78f99ce10cbacc2195aaa4736129cdcb5fec7c381e826ebb04789dfbdd515903L15-R24)
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>