Skip to content

Integrate ONNX 1.23.0 base plumbing - #32359

Merged
G. Ramalingam (gramalingam) merged 54 commits into
mainfrom
justinchuby-onnx-1-23-opset-28-base
Sep 30, 2026
Merged

G. Ramalingam (gramalingam) merged 54 commits into
mainfrom
justinchuby-onnx-1-23-opset-28-base

Conversation

@justinchuby

@justinchuby Justin Chu (justinchuby) commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • pin ONNX Runtime to ONNX c78026fa617f273fe5c685c74f9de3e6e96504ed (1.23.0, opset 28 development)
  • raise the base, CoreML, NNAPI, VSINPU, and WebNN opset ceilings to 28
  • add the mechanically required Float6 public element-type mappings and exhaustive conversion coverage
  • materialize the removed ONNX node-test corpus at build time, with version and minimum-case tripwires in the materializer, C++ runner, and Python harness
  • add opset-28 Mod and signed BitShift support, including coordinated CPU/CUDA Mod registration boundaries
  • update provider compatibility, backend-test filters, and tolerances for the ONNX 1.23 test corpus

CI follow-up fixes

  • correct the ONNX v1.23.0 vcpkg archive SHA512 to the mirrored artifact
  • avoid installing ONNX under free-threaded CPython, where ONNX's stable-ABI development requirements are unavailable
  • restore the backend-filter category required by both the Python and Node.js test harnesses
  • exclude OpenVINO from opset-28 floating-point floor Mod and signed BitShift cases it does not currently support correctly
  • update CUDA kernel registration for the opset-28 Mod version split

Scope

This stack establishes ONNX 1.23/opset-28 base plumbing and implements the Mod and signed BitShift changes needed by the updated schema. Other per-operator opset-28 registrations and kernel implementations remain follow-up work and should be coordinated across every registering EP. The materialized CPU runner keeps the existing Python ReduceMax empty-bool exclusion in parity.

Validation

  • verified target archive hashes and onnx.patch / binskim.patch byte identity and application
  • verified the corrected vcpkg artifact is available from the Microsoft mirror
  • source-built exact onnx==1.23.0 wheel
  • materialized 1,884 node cases; direct tensor/map/sequence/optional fixture serialization smoke test passed
  • --minimal_build extended build passed
  • regular full build passed
  • onnx_test_node_materialized CTest passed: 1,762 CPU cases, 0 failures, with ALLOW_RELEASED_ONNX_OPSET_ONLY=0
  • validated packaging-script shell syntax and the shared backend-filter JSON contract

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
@justinchuby
Justin Chu (justinchuby) marked this pull request as ready for review September 16, 2026 21:26
Copilot AI balanced review requested due to automatic review settings September 16, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 Mod registration starting at opset 13 is open-ended, so it binds opset-28 nodes, but its floating implementation rejects fmod=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.

Comment thread cmake/onnxruntime_unittests.cmake Outdated
Comment thread cmake/patches/onnx/onnx.patch
Comment thread cmake/vcpkg-ports/onnx/binskim.patch
Comment thread onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc Outdated
Comment thread onnxruntime/core/providers/webnn/builders/impl/base_op_builder.h
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 c78026f source includes the newer LRN node-test generator ([1,5,5,5] input), while the 1.23.0rc1 release branch still generates [5,5,5,5]; the release-base-only checks accept both as 1.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::CApiElementTypeFromProtoType still falls through to UNDEFINED for both Float6 values (tensorprotoutils.cc:2023-2059), and that helper feeds custom-op shape inference at custom_ops.cc:86. Thus a custom shape-inference callback sees UNDEFINED instead 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, and pad_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>
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Sep 22, 2026
<details><summary>Claude's draft</summary>

conda-forge's global pin moved libonnx to 1.23.0. onnxruntime 1.30.0 was
released against ONNX 1.22 and does not compile against it:

    onnxruntime/core/framework/tensorprotoutils.h:76:58: error:
      static assertion failed: TensorProto data type element-size map
      must cover every numeric data type.

ONNX 1.23.0 adds the TensorProto data types FLOAT6E2M3 (27) and
FLOAT6E3M2 (28) and bumps the ai.onnx opset to 28. onnxruntime's
element-size table is sized by TensorProto_DataType_DataType_ARRAYSIZE,
so the two new slots default to zero and trip its own static_assert;
onnxruntime_map_type_info.h has a matching consteval bijectivity check
that fails next.

Patch 0013 backports the source hunks of
microsoft/onnxruntime#32359 ("Integrate ONNX
1.23.0 base plumbing"), which is still open upstream: the two new enum
values and their mappings both ways, the element-size entries, opset
27 -> 28 in the transpose optimizer and the op builders (Q/DQ builders
stay at 27, as upstream), the EmbedLayerNorm fusion opset lists, and
session.allow_released_opsets_only on the in-memory load path. The C++
unit-test hunks are included so the ctest suite still builds.

Three upstream hunks are omitted, with the reasons recorded in the patch
header: the webgpu Logger refactor (unrelated, does not apply to 1.30.0,
and that provider is not built here), a qdq_transformer test that does
not exist in 1.30.0, and the cmake/vcpkg/requirements pins for
onnxruntime's own vendored ONNX, which this branch replaces with the
packaged libonnx.

Pin onnx to 1.23.0: builds 0 and 1 of onnx 1.22.0 predate the libonnx
split, ship their own libonnx.so and libonnx_proto.so and do not depend
on libonnx, so they would install alongside it and overwrite its files.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume 3cf41599-db98-4c6f-a67a-ee7dcacda8b4
```
</details>

Claude-Session: https://claude.ai/code/session_01Jxvsn2W6MfjGKXcabWVHNe
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Sep 22, 2026
<details><summary>Claude's draft</summary>

conda-forge's global pin moved libonnx to 1.23.0. onnxruntime 1.30.0 was
released against ONNX 1.22 and does not compile against it:

    onnxruntime/core/framework/tensorprotoutils.h:76:58: error:
      static assertion failed: TensorProto data type element-size map
      must cover every numeric data type.

ONNX 1.23.0 adds the TensorProto data types FLOAT6E2M3 (27) and
FLOAT6E3M2 (28) and bumps the ai.onnx opset to 28. onnxruntime's
element-size table is sized by TensorProto_DataType_DataType_ARRAYSIZE,
so the two new slots default to zero and trip its own static_assert;
onnxruntime_map_type_info.h has a matching consteval bijectivity check
that fails next.

Patch 0013 backports the source hunks of
microsoft/onnxruntime#32359 ("Integrate ONNX
1.23.0 base plumbing"), which is still open upstream: the two new enum
values and their mappings both ways, the element-size entries, opset
27 -> 28 in the transpose optimizer and the op builders (Q/DQ builders
stay at 27, as upstream), the EmbedLayerNorm fusion opset lists, and
session.allow_released_opsets_only on the in-memory load path. The C++
unit-test hunks are included so the ctest suite still builds.

Three upstream hunks are omitted, with the reasons recorded in the patch
header: the webgpu Logger refactor (unrelated, does not apply to 1.30.0,
and that provider is not built here), a qdq_transformer test that does
not exist in 1.30.0, and the cmake/vcpkg/requirements pins for
onnxruntime's own vendored ONNX, which this branch replaces with the
packaged libonnx.

Pin onnx to 1.23.0: builds 0 and 1 of onnx 1.22.0 predate the libonnx
split, ship their own libonnx.so and libonnx_proto.so and do not depend
on libonnx, so they would install alongside it and overwrite its files.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume 3cf41599-db98-4c6f-a67a-ee7dcacda8b4
```
</details>

Claude-Session: https://claude.ai/code/session_01Jxvsn2W6MfjGKXcabWVHNe
@gramalingam

Copy link
Copy Markdown
Contributor

[Medium] Restrict the BitShift version cap to the internal DirectML kernel

File: onnxruntime/core/providers/dml/DmlExecutionProvider/src/AbiCustomRegistry.cpp:394-398

The new BitShift special case matches only the operator name and minimum
opset version. AbiCustomRegistry is also used by the public WinML custom
operator registration path, which accepts CPU kernels and arbitrary domains.
As a result, a custom kernel named BitShift with
minimumOperatorSetVersion == 11 is silently capped at opset 27 even when it
is not the built-in DirectML ONNX kernel.

For a custom-domain BitShift whose schema advances to version 28, an
opset-28 model will fail kernel resolution. For an ONNX-domain CPU override,
ORT may execute its built-in CPU kernel instead of the registered custom
kernel.

Restrict the cap to the internal DirectML registration, such as by checking
the ONNX domain together with MLOperatorExecutionType::D3D12 and/or
isInternalOperator, rather than matching only the operator name and minimum
version.

The added BitShift tests exercise ORT's built-in CPU implementation.
Existing DML tests exclude out-of-range shifts, and no test registers a CPU
or custom-domain BitShift through IMLOperatorRegistry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0dfdfce6-9bcd-41f1-9969-ed5f618a8ace
Update the vcpkg archive hash, align CUDA Mod kernel registration with its opset split, and avoid unsupported ONNX source builds for free-threaded Python packaging.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the backend filter category required by Python and Node test harnesses, and exclude OpenVINO from opset 28 Mod and signed BitShift cases it does not support correctly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc Outdated
Comment thread onnxruntime/core/session/inference_session.cc
Comment thread tools/ci_build/github/linux/build_linux_python_package.sh
Comment thread cmake/onnxruntime_unittests.cmake Outdated
Comment thread include/onnxruntime/core/session/onnxruntime_c_api.h Outdated
Scope opset 28 filters, consistently honor unreleased-opset policy, remove transitive ONNX dependencies from free-threaded builds, derive materialization version from fetched sources, and clarify Float6 storage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the archive URL for ONNX wheel parity under vcpkg, update packed QMoE routing capture for the current kernel-pilot API, and refresh the Android minimal binary-size baseline for Float6 support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@gramalingam
G. Ramalingam (gramalingam) merged commit 9b87005 into main Sep 30, 2026
114 of 116 checks passed
@gramalingam
G. Ramalingam (gramalingam) deleted the justinchuby-onnx-1-23-opset-28-base branch September 30, 2026 15:34
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Oct 2, 2026
<details><summary>Claude's draft</summary>

conda-forge's global pin moved libonnx to 1.23.0. onnxruntime 1.30.0 was
released against ONNX 1.22 and does not compile against it:

    onnxruntime/core/framework/tensorprotoutils.h:76:58: error:
      static assertion failed: TensorProto data type element-size map
      must cover every numeric data type.

ONNX 1.23.0 adds the TensorProto data types FLOAT6E2M3 (27) and
FLOAT6E3M2 (28) and bumps the ai.onnx opset to 28. onnxruntime's
element-size table is sized by TensorProto_DataType_DataType_ARRAYSIZE,
so the two new slots default to zero and trip its own static_assert;
onnxruntime_map_type_info.h has a matching consteval bijectivity check
that fails next.

Patch 0013 backports the source hunks of
microsoft/onnxruntime#32359 ("Integrate ONNX
1.23.0 base plumbing"), which is still open upstream: the two new enum
values and their mappings both ways, the element-size entries, opset
27 -> 28 in the transpose optimizer and the op builders (Q/DQ builders
stay at 27, as upstream), the EmbedLayerNorm fusion opset lists, and
session.allow_released_opsets_only on the in-memory load path. The C++
unit-test hunks are included so the ctest suite still builds.

Three upstream hunks are omitted, with the reasons recorded in the patch
header: the webgpu Logger refactor (unrelated, does not apply to 1.30.0,
and that provider is not built here), a qdq_transformer test that does
not exist in 1.30.0, and the cmake/vcpkg/requirements pins for
onnxruntime's own vendored ONNX, which this branch replaces with the
packaged libonnx.

Pin onnx to 1.23.0: builds 0 and 1 of onnx 1.22.0 predate the libonnx
split, ship their own libonnx.so and libonnx_proto.so and do not depend
on libonnx, so they would install alongside it and overwrite its files.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume 3cf41599-db98-4c6f-a67a-ee7dcacda8b4
```
</details>

Claude-Session: https://claude.ai/code/session_01Jxvsn2W6MfjGKXcabWVHNe
G. Ramalingam (gramalingam) added a commit that referenced this pull request Oct 3, 2026
## Summary

Temporarily roll back the ONNX 1.23 integration in #32359, restoring
ONNX **1.22.0** source/submodule, vcpkg, and Python requirements pins
and the pre-integration opset ceilings and behavior.

This is one combined commit: the exact inverse of squash commit
`9b87005d050668a5998fdc7a711cab40707aa6d1` on current main, plus removal
of only the two Float6 conversion cases introduced in
`include/onnxruntime/ep/adapter/tensor_helper.h` by #33067. The latter
must be removed together because the rollback removes the corresponding
unreleased C API and ONNX enum values.

**Preserved:** #33067's UINT2/INT2/FLOAT8E8M0 conversions and all
independent MoE/CUDA fixes; subsequent safety fixes and CI changes;
node-test materialization support that predates #32359. Files are not
replaced wholesale with old versions.

## Why roll back

- onnx/onnx#8471 reports ONNX 1.23.0's external tensor read/re-save
regression. onnx/onnx#8472 fixes the in-place mutation and is included
in 1.23.1.
- onnx/onnx#8529 remains open: ONNX 1.23.0 and 1.23.1 C++
`LastReleaseVersionMap` reports released opset 27 while Python reports
28. Upgrading to 1.23.1 alone therefore does not resolve both blockers.

Wait for an upstream release containing both fixes, then reintegrate
ONNX with coordinated pins, Float6 mappings, opset/kernel changes, patch
validation, and CPU/GPU coverage. No future release version is assumed.
The metadata-only proposal #33071 remains untouched and should not land
if this rollback is adopted.

## Validation

Completed locally on Windows, commit `88ae24ff1d`:

- Proved the integration rollback tree is exactly the reverse patch
applied to current main, preserving subsequent changes; proved the
adapter differs by only the two Float6 cases.
- Audited the seven CI and materialization ONNX pins and found no
residual Float6/opset-28 source dependencies. Existing model-specific
requirements are unchanged.
- `onnx.patch` and `binskim.patch` are byte-identical. Verified the
reverted vcpkg archive SHA512 and successful application of both the
FetchContent patch and the complete ordered vcpkg patch sequence against
the pristine ONNX 1.22.0 release archive.
- CPU/shared-runtime configure and compilation passed with
`FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER`: built
`onnxruntime_test_all`, `onnxruntime_provider_test`, `onnx_test_runner`,
and `onnxruntime_ep_graph_test`, including the CPU runtime DLL.
- Focused core/type/serialization/session tests: **233 passed, 7
skipped** (240 selected; one additional disabled test).
- Focused CPU operator tests including Mod, BitShift, and
DequantizeLinear: **187 passed, 1 skipped** (188 selected).
- Plugin EP graph API tests: **15 passed**.
- Compiled the full plugin adapter header and executed all **27**
remaining C API element-type conversions successfully, including
UINT2/INT2/FLOAT8E8M0. This is a standalone adapter smoke check, not a
CUDA plugin runtime test.
- ONNX 1.22 CPU node runner with `-m 1500` and
`ALLOW_RELEASED_ONNX_OPSET_ONLY=0`: **1,650 cases**, **1,553
succeeded**, **97 not implemented**, **0 failed**; exit 0. Existing
runner exclusions remain in place.
- Build argument unit tests: **6 passed**.
- Preserved ONNX node-materialization equivalence unittest: **1
passed**, with 18 existing accepted NumPy ULP-skew cases and one
codec-dependent input-byte difference.
- Repository `lintrunner` and `git diff --check` passed.

**Outstanding before promotion from draft:** complete unfiltered C++
suites, the separate minimal-build gate, Python ORT runtime/backend
tests, and CUDA/GPU provider compilation and execution. GPU behavior has
not been validated here. No packaging or release pipeline was manually
triggered.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Oct 4, 2026
<details><summary>Claude's draft</summary>

Regenerate 0013 from microsoft/onnxruntime#32359 as merged (9b87005)
instead of the earlier in-review snapshot. On top of the previous
backport this adds:

- opset-28 Mod (floating-point floor mod) on the CPU and CUDA EPs and
  opset-28 signed BitShift on the CPU EP, capping the old registrations
  at 27;
- the opset-28 Cast in the attention, FastGelu, IsInf/ReduceSum,
  LayerNorm and Pad fusions;
- the Float6 cases in the tensorprotoutils type switches;
- session.allow_released_opsets_only on the remaining model load paths
  and in the Python onnx backend;
- the matching C++ and Python test updates.

Still omitted: the WebGPU logger refactor, a qdq_transformer_test.cc
hunk for a test 1.30.0 does not have, and the cmake/tools/docs/js/csharp
changes that concern onnxruntime's vendored ONNX.

Upstream reverted the integration in microsoft/onnxruntime#33073 to
wait for an ONNX release fixing onnx/onnx#8529 (the C++
LastReleaseVersionMap still reports opset 27). We link libonnx 1.23.0,
so we knowingly carry the reverted patch; the meta.yaml comment now says
so.

The patch applies on top of 0002-0012 with both git apply and patch. A
local linux-64 CPU build was still running when this was pushed.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054
```
</details>
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Oct 11, 2026
<details><summary>Claude's draft</summary>

conda-forge's global pin moved libonnx to 1.23.0. onnxruntime 1.30.0 was
released against ONNX 1.22 and does not compile against it:

    onnxruntime/core/framework/tensorprotoutils.h:76:58: error:
      static assertion failed: TensorProto data type element-size map
      must cover every numeric data type.

ONNX 1.23.0 adds the TensorProto data types FLOAT6E2M3 (27) and
FLOAT6E3M2 (28) and bumps the ai.onnx opset to 28. onnxruntime's
element-size table is sized by TensorProto_DataType_DataType_ARRAYSIZE,
so the two new slots default to zero and trip its own static_assert;
onnxruntime_map_type_info.h has a matching consteval bijectivity check
that fails next.

Patch 0013 backports the source hunks of
microsoft/onnxruntime#32359 ("Integrate ONNX
1.23.0 base plumbing"), which is still open upstream: the two new enum
values and their mappings both ways, the element-size entries, opset
27 -> 28 in the transpose optimizer and the op builders (Q/DQ builders
stay at 27, as upstream), the EmbedLayerNorm fusion opset lists, and
session.allow_released_opsets_only on the in-memory load path. The C++
unit-test hunks are included so the ctest suite still builds.

Three upstream hunks are omitted, with the reasons recorded in the patch
header: the webgpu Logger refactor (unrelated, does not apply to 1.30.0,
and that provider is not built here), a qdq_transformer test that does
not exist in 1.30.0, and the cmake/vcpkg/requirements pins for
onnxruntime's own vendored ONNX, which this branch replaces with the
packaged libonnx.

Pin onnx to 1.23.0: builds 0 and 1 of onnx 1.22.0 predate the libonnx
split, ship their own libonnx.so and libonnx_proto.so and do not depend
on libonnx, so they would install alongside it and overwrite its files.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume 3cf41599-db98-4c6f-a67a-ee7dcacda8b4
```
</details>

Claude-Session: https://claude.ai/code/session_01Jxvsn2W6MfjGKXcabWVHNe
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Oct 11, 2026
<details><summary>Claude's draft</summary>

Regenerate 0013 from microsoft/onnxruntime#32359 as merged (9b87005)
instead of the earlier in-review snapshot. On top of the previous
backport this adds:

- opset-28 Mod (floating-point floor mod) on the CPU and CUDA EPs and
  opset-28 signed BitShift on the CPU EP, capping the old registrations
  at 27;
- the opset-28 Cast in the attention, FastGelu, IsInf/ReduceSum,
  LayerNorm and Pad fusions;
- the Float6 cases in the tensorprotoutils type switches;
- session.allow_released_opsets_only on the remaining model load paths
  and in the Python onnx backend;
- the matching C++ and Python test updates.

Still omitted: the WebGPU logger refactor, a qdq_transformer_test.cc
hunk for a test 1.30.0 does not have, and the cmake/tools/docs/js/csharp
changes that concern onnxruntime's vendored ONNX.

Upstream reverted the integration in microsoft/onnxruntime#33073 to
wait for an ONNX release fixing onnx/onnx#8529 (the C++
LastReleaseVersionMap still reports opset 27). We link libonnx 1.23.0,
so we knowingly carry the reverted patch; the meta.yaml comment now says
so.

The patch applies on top of 0002-0012 with both git apply and patch. A
local linux-64 CPU build was still running when this was pushed.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054
```
</details>
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Oct 11, 2026
<details><summary>Claude's draft</summary>

Adds the onnxruntime/test/optimizer/qdq_transformer_test.cc hunk of
microsoft/onnxruntime#32359 to the ONNX 1.23 patch. It was left out for
1.30.0 because the test did not exist there; it does in 1.31.0, and with
libonnx reporting opset 28 the test model defaults to an opset whose
Q/DQ schemas the cleanup transformer does not match:

    qdq_transformer_test.cc:5716: Failure
    Expected equality of these values:
      removed_node_indices.size()  Which is: 0
      2U

Seen in a local linux-64 CPU build.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054
```
</details>

Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
Mark Harfouche (hmaarrfk) added a commit to hmaarrfk/onnxruntime-feedstock that referenced this pull request Oct 11, 2026
<details><summary>Claude's draft</summary>

Replaces the port of the reverted microsoft/onnxruntime#32359 with a
backport of its redo, microsoft/onnxruntime#33134 "Reintegrate ONNX
1.23.2 base plumbing", taken at its current head d9485f2a (open, CI
green, one approval; not merged, so it may still change).

Only the include/ and onnxruntime/ changes are taken, as before. They
apply to 1.31.0 with patches 0001-0013 without fuzz except for two
comment-only hunks in inference_session_test.cc, which are dropped.

#33134 registers Cast for opset 28 itself, so the conda-forge kernel
patch (0015) is regenerated on top of it without its Cast hunks; the
other 14 type-only operators still need it. Its header is shortened.

meta.yaml carries only the two-line comment for 0014.

Resume this Claude session:
```
cd /home/mark/git/feedstock/onnxruntime-feedstock
claude --resume c16b7120-814d-4a38-9b1f-2afd9f75d054
```
</details>

Claude-Session: https://claude.ai/code/session_01XZa8BwzZpVJtREiCoVo1k6
Ti-Tai Wang (titaiwangms) pushed a commit that referenced this pull request Oct 12, 2026
### Description
<!-- Describe your changes. -->

Reintegrate the ONNX 1.23 base plumbing originally introduced by #32359
and reverted by #33073, now using ONNX **1.23.2**.

- Coordinate source/submodule, FetchContent, vcpkg, and Python
dependency pins and raise the relevant opset ceilings to 28.
- Restore Float6 public element-type mappings and conversion coverage,
preserving subsequent independent type-support changes.
- Update existing-type Cast registrations, CPU/CUDA Mod boundaries,
signed BitShift support, provider compatibility, backend
filters/tolerances, and operator documentation.
- Materialize the removed upstream node-test corpus with exact-version
and minimum-case guards, and cover backend serialization and
released-opset policy.
- Keep matching FetchContent/vcpkg compatibility patches; remove the
released-opset correction now fixed upstream in 1.23.2.
- Address review feedback: OpenVINO rejects BitShift-28; CPU/CUDA legacy
SpaceToDepth kernels stop at 27; DirectML accepts only safe DCR;
unverified graph providers defer SpaceToDepth-28. Full builds use ONNX
function expansion for CRD, with literal-output and routing regressions.
Avoid creating unsupported SpaceToDepth-28 nodes in the post-expansion
Slice/Concat fusion.
- Use shared ABI-safe tensor-element conversion in the native ONNX node
runner, fixing INT2/UINT2/FLOAT8E8M0 corpus decoding after the main
merge.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

This is a redo of #32359 after its rollback in #33073. ONNX 1.23.2
includes the external tensor read/re-save fix from onnx/onnx#8472 for
onnx/onnx#8471 and the released-opset metadata fix from onnx/onnx#8544
for onnx/onnx#8529. The redundant local `LastReleaseVersionMap` patch
has been removed. Remaining FetchContent/vcpkg patches are
byte-identical and apply against the pinned release.

**Scope:** This PR establishes dependency/runtime base integration. Full
per-operator opset-28 support remains separate follow-up work; see
#32362, #32369, #32372, #32378, #32381, and #32393. These references
describe staged scope, not a claim that every follow-up has landed or
every opset-28 operator is supported. Runtime function expansion is a
full-build fallback, not minimal/ORT-format runtime coverage.

### Local validation

Completed on Windows with retained CPU-only Ninja/MSVC `RelWithDebInfo`
builds and strict released-opset policy:

- Built `onnxruntime_provider_test`, `onnxruntime_test_all`,
`onnx_test_runner`, and Python bindings against ONNX 1.23.2; retained
build remains available for incremental work.
- Source-built and installed the exact patched ONNX 1.23.2 Python wheel.
- Separate `--minimal_build extended` shared runtime configured,
compiled, and linked successfully with ML/contrib ops and unit tests
disabled. This exercises `ONNX_MINIMAL_BUILD=ON`; it is not a
minimal-runtime function-op execution test.
- Mod/BitShift/SpaceToDepth/Cast provider tests: **247 passed**, no
skips. SpaceToDepth checks default DCR, explicit DCR, and CRD with
distinct literal expected outputs, expansion, and legacy opset
boundaries.
- Slice/Concat fusion and type-info/tensor-proto framework tests: **27
passed**, no skips.
- Python backend tests: **22 passed**, plus **2 subtests passed**.
- Full Python backend series: **4,066 tests**, **2,685 skipped**, zero
failures. Skipped/unsupported coverage is not a pass.
- Materialized **1,884 node cases**. Native CPU runner with `-m 1500`
collected **1,760 cases**: **1,590 succeeded**, **170 not implemented**,
**zero failed**, exit 0. These results do not establish complete
opset-28 support.
- Generated CPU operator documentation matches the rebuilt kernel
registry; verified archive hashes, patch identity/application, submodule
SHA, and changed-file lint.

**Remaining validation/infrastructure limits:** GPU and other EP
execution relies on CI; optional-provider routing checks are compiled
into the relevant builds but were unavailable locally. Full unfiltered
C++ suites and the ancillary broad `ALL` target were not rerun. The
oracle-dependent corpus equivalence test skips because upstream no
longer ships the corpus. The new ONNX 1.23.2 tarball currently returns
**404 from the Microsoft vcpkg asset mirror**; it still needs
Terrapin/infra seeding before read-only `x-block-origin` vcpkg legs can
download it. FetchContent and the successful minimal build are
mirror-independent. New-head CI is pending.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gramalingam <10075881+gramalingam@users.noreply.github.com>
G. Ramalingam (gramalingam) added a commit that referenced this pull request Oct 15, 2026
### Summary
- split CPU and CUDA Mod registrations into opsets 13-27 and 28
- implement ONNX Mod-28 floating floor-mod semantics, including signed
zero, infinities, NaNs, and mixed-sign operands
- register DirectML's Python-compatible floor modulus for opset 28
- cap QNN, CANN, MIGraphX, and OpenVINO Mod support at opset 27 so opset
28 falls back instead of advertising unverified semantics
- preserve legacy behavior and harden signed integer `min % -1`

Stacked on #32359 / `justinchuby-onnx-1-23-opset-28-base` at checkpoint
`92853202d4cb2bd7b9c20f1ba3abf1427980cf31`.

### Validation
- Windows RelWithDebInfo CMake configuration completed against ONNX
1.23.0
- focused floor-mod edge/reference formula validation passed
- `git diff --check` passed
- independent code review found no significant issues

A first-time local `onnxruntime_test_all` build was stopped after
spending about an hour compiling unrelated dependencies; a provider-only
compile was also gated on unfinished protobuf-generated headers. No
changed-file compiler error was observed. CUDA and provider-specific
builds remain for CI.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Ganesan Ramalingam <grama@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gramalingam <10075881+gramalingam@users.noreply.github.com>
Copilot-Session: 6e64e522-b07f-4c1c-abf1-3985268beb7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants