Integrate ONNX 1.23.0 base plumbing - #32359
Justin Chu (justinchuby) wants to merge 47 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep opset-28 kernel implementations in their dedicated follow-up PRs while fixing the base integration test assumptions and narrowly filtering confirmed backend failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Skip only the additional bare node cases confirmed by the existing Linux CI log, while retaining coverage for expanded variants. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…3-opset-28-base Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
There was a problem hiding this comment.
🟡 Changes recommended
Opset-28 dispatch can mis-handle valid models, and the iOS build and formatting paths contain concrete regressions.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates ONNX Runtime’s dependency and infrastructure for ONNX 1.23.0 and development opset 28.
Changes:
- Pins ONNX sources and CI dependencies to the 1.23 release line.
- Adds Float6 public type mappings and opset-28 ceilings.
- Materializes and validates the removed ONNX node-test corpus.
File summaries
| File | Description |
|---|---|
.github/workflows/linux_ci.yml |
Updates materialization dependency documentation. |
cmake/deps.txt |
Pins the ONNX source archive. |
cmake/external/onnx |
Advances the ONNX submodule. |
cmake/onnxruntime_unittests.cmake |
Updates materialization version parsing and dependencies. |
cmake/patches/onnx/onnx.patch |
Rebases ONNX build and iOS patches. |
cmake/vcpkg-ports/onnx/binskim.patch |
Mirrors the rebased ONNX patch. |
cmake/vcpkg-ports/onnx/fix-dependency-protobuf.patch |
Rebases protobuf patch context. |
cmake/vcpkg-ports/onnx/portfile.cmake |
Updates vcpkg source reference and hash. |
cmake/vcpkg-ports/onnx/vcpkg.json |
Sets ONNX vcpkg version metadata. |
include/onnxruntime/core/graph/schema_registry.h |
Matches the updated ONNX registry signature. |
include/onnxruntime/core/session/onnxruntime_c_api.h |
Exposes Float6 element types. |
js/web/docs/webgl-operators.md |
Regenerates opset documentation. |
onnxruntime/core/framework/onnxruntime_map_type_info.h |
Extends element-type mapping validation. |
onnxruntime/core/framework/tensor_type_and_shape.cc |
Maps Float6 types to public enums. |
onnxruntime/core/framework/tensorprotoutils.h |
Adds Float6 logical element sizes. |
onnxruntime/core/optimizer/embed_layer_norm_fusion.cc |
Recognizes updated opset versions. |
onnxruntime/core/optimizer/transpose_optimization/optimizer_api.h |
Enables opset-28 optimization. |
onnxruntime/core/providers/coreml/builders/impl/base_op_builder.h |
Raises the CoreML ceiling. |
onnxruntime/core/providers/nnapi/nnapi_builtin/builders/impl/base_op_builder.h |
Raises the NNAPI ceiling. |
onnxruntime/core/providers/vsinpu/builders/impl/base_op_builder.h |
Raises the VSINPU ceiling. |
onnxruntime/core/providers/webnn/builders/impl/base_op_builder.h |
Raises the WebNN ceiling. |
onnxruntime/test/framework/tensorutils_test.cc |
Covers Float6 element sizes. |
onnxruntime/test/framework/type_info_test.cc |
Covers Float6 type conversion. |
onnxruntime/test/onnx/TestCase.cc |
Mirrors the ReduceMax exclusion. |
onnxruntime/test/optimizer/layout_transformation_potentially_added_ops_test.cc |
Temporarily exempts opset-28 Q/DQ. |
onnxruntime/test/providers/cpu/controlflow/scan_test.cc |
Updates expected ONNX diagnostics. |
onnxruntime/test/python/onnx_node_test_equivalence_test.py |
Reads commit-pin version metadata. |
onnxruntime/test/python/requirements.txt |
Pins the ONNX RC wheel. |
onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc |
Defers unsupported opset-28 cases. |
onnxruntime/test/unittest_util/op_tester.cc |
Adds a released ONNX import for custom-domain tests. |
requirements-materialize-onnx-node-tests.txt |
Updates the materializer ONNX pin. |
tools/ci_build/github/linux/docker/inference/aarch64/python/cpu/scripts/requirements.txt |
Updates the AArch64 ONNX pin. |
tools/ci_build/github/linux/docker/scripts/lort/requirements.txt |
Updates the LORT ONNX pin. |
tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt |
Updates the manylinux ONNX pin. |
tools/ci_build/github/linux/docker/scripts/requirements.txt |
Updates the Linux image ONNX pin. |
tools/ci_build/github/linux/python/requirements.txt |
Updates the Linux CI ONNX pin. |
tools/ci_build/github/windows/python/requirements.txt |
Updates the Windows CI ONNX pin. |
tools/python/materialize_onnx_node_tests.py |
Enforces exact dataset arity. |
Review details
Suppressed comments (1)
onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc:118
- These skips hide a runtime correctness regression: the existing CPU/CUDA
Modregistration starting at opset 13 is open-ended, so it binds opset-28 nodes, but its floating implementation rejectsfmod=0, which opset 28 now defines as floor-mod. Version-cap the legacy registrations at 27 or include the opset-28 implementation before enabling this schema; otherwise valid models throw during execution.
// TODO(#32369): Remove these exact skips when the opset-28 Mod kernels land.
"^test_mod_broadcast(_(cpu|cuda))?$",
"^test_mod_float16_mixed_sign_fmod_0(_(cpu|cuda))?$",
"^test_mod_float32_mixed_sign_fmod_0(_(cpu|cuda))?$",
"^test_mod_float64_mixed_sign_fmod_0(_(cpu|cuda))?$",
- Files reviewed: 38/38 changed files
- Comments generated: 6
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
There was a problem hiding this comment.
🔵 Needs a closer look
The source/wheel mismatch, incomplete Float6 conversion, and missing Cast-28 matcher updates can cause test drift, incorrect API type reporting, and optimizer regressions.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
cmake/deps.txt:39
- The source and wheel pins are not actually in lockstep. The pinned
c78026fsource includes the newer LRN node-test generator ([1,5,5,5]input), while the1.23.0rc1release branch still generates[5,5,5,5]; the release-base-only checks accept both as1.23.0. As a result, CI materializes and runs a corpus from different ONNX code than ORT compiles, and the post-#7959 tree has no disk oracle to catch that drift. Pin a wheel built from the exact source revision (or pin the source to rc1) and enforce revision/exact-version parity.
onnxruntime/core/framework/tensor_type_and_shape.cc:195 - These cases update only one Proto-to-C-API conversion path.
utils::CApiElementTypeFromProtoTypestill falls through toUNDEFINEDfor both Float6 values (tensorprotoutils.cc:2023-2059), and that helper feeds custom-op shape inference atcustom_ops.cc:86. Thus a custom shape-inference callback seesUNDEFINEDinstead of either newly public enum. Add both cases there (and in its standalone test-runner counterpart) with coverage.
onnxruntime/core/optimizer/embed_layer_norm_fusion.cc:250 - Cast now has schema version 28, but this is the only fusion matcher updated. Other Cast-sensitive optimizers still stop at 25—for example
layer_norm_fusion.cc:148,fast_gelu_fusion.cc:178,isinf_reducesum_fusion.cc:48, andpad_fusion.cc:135—so equivalent opset-28 graphs silently lose those fusions. Audit all Cast version lists and extend the compatible matchers/tests together.
- Files reviewed: 45/45 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Define the new SpaceToDepth and DepthToSpace documentation symbols in ONNX's __ONNX_NO_DOC_STRINGS branch so minimal, WebAssembly, and lite-protobuf links remain complete. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89f8a79b-d043-4bde-84ae-2617e46b43a9
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d1cdb786-d8fa-4e20-ba7b-4b170cbce19c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d1cdb786-d8fa-4e20-ba7b-4b170cbce19c
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b0cda09-da86-437d-aefe-a8836575d451
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Synchronize serialized-model sessions with the Python backend policy and cover the opset 28 path. Exclude the exact CUDA backend cases independently unsupported by the updated ONNX corpus. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Read session.allow_released_opsets_only before loading serialized ONNX model bytes so Python backend sessions can opt into the under-development opset. Update the transformer test helper comment to match the corrected byte-loader behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Run the ONNX backend test child in development-opset mode for CUDA as well as CPU. This prevents the build driver from overriding the job's permissive policy with strict released-only validation while leaving the runtime default unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Exclude only the 56 CUDA backend cases that deterministically fail while initializing unassigned fallback nodes or resolving the Swish function dependency. Keep the CPU, suffixless, and unrelated variants unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Bring in the upstream quantized GQA workspace test geometry correction and the latest main changes without rebasing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
|
I have uploaded official 1.23. We should use official 1.23 now. |
Summary
c78026fa617f273fe5c685c74f9de3e6e96504ed(1.23.0, opset 28 development)Scope
This stack base intentionally does not add per-operator opset-28 registrations or kernel implementations. Follow-up stacks own coordinated version splits across every registering EP. The materialized CPU runner keeps the existing Python
ReduceMaxempty-bool exclusion in parity.Validation
onnx.patch/binskim.patchbyte identity and applicationonnx==1.23.0wheel--minimal_build extendedbuild passedonnx_test_node_materializedCTest passed: 1,762 CPU cases, 0 failures, withALLOW_RELEASED_ONNX_OPSET_ONLY=0External dependency
The vcpkg artifact mirror for the new SHA512 currently returns HTTP 404 and requires Terrapin/infra seeding. No privileged upload was attempted.