[THROWAWAY/DO-NOT-MERGE] Validate onnx#8056 Xcode fix via ORT iOS CI - #28815
Closed
titaiwangms wants to merge 18 commits into
Closed
[THROWAWAY/DO-NOT-MERGE] Validate onnx#8056 Xcode fix via ORT iOS CI#28815titaiwangms wants to merge 18 commits into
titaiwangms wants to merge 18 commits into
Conversation
Pin ONNX to rel-1.22.0 HEAD commit bc3be77bec2f628788796dff60819186bacf49df (VERSION_NUMBER 1.22.0rc1): - cmake/deps.txt: commit-archive zip URL + SHA1 421e5a9afb6c41a54696e424e5b9a3796aab6821 - cmake/external/onnx: submodule -> bc3be77b - cmake/vcpkg-ports/onnx/vcpkg.json: version-semver 1.22.0, port-version 0 - cmake/vcpkg-ports/onnx/portfile.cmake: REF commit form + tar.gz SHA512 e0c526f5...3ce467 Rebase cmake/patches/onnx/onnx.patch to ONNX 1.22 and mirror byte-identically into binskim.patch: - Kept ONNX_MINIMAL_BUILD option (rebased context) - Restructured the minimal-build source-selection hunk for ONNX 1.22's new onnx_core OBJECT library / add_subdirectory(onnx) layout - Dropped the Utils.cmake protobuf_warnings hunk (already removed upstream in 1.22) - Kept the GroupNormalization-18 .Deprecate() removal (still present in 1.22) Agent-signed-off: Developer (8ac66e2a) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ONNX 1.22.0rc1 is published on PyPI (verified via pip index versions onnx --pre), so all 7 requirements files use the published wheel pin onnx==1.22.0rc1 rather than the git source pin. Agent-signed-off: Developer (0ede529c) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…o 27 and register Range at opset 27 - optimizer_api.h: kMaxSupportedOpset 26 -> 27 - Range CPU kernel split into VERSIONED [11,26] + new non-versioned [27] reusing the existing kernel (Range-27 adds fp16/bf16 types and a stash_type attr; the existing common numeric types bind, fp16/bf16 is a deferred enhancement) - cpu_execution_provider.cc: versioned the Range forward-declare and BuildKernelCreateInfo entries and added the opset-27 Range registration Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…doc (ONNX 1.22.0rc1, issue microsoft#28752) - onnx_backend_test_series_filters.jsonc: exclude deferred opset-27 ops CausalConvWithState and LinearAttention (whole families, base + _expanded), and the Range-27 float16/bfloat16 node tests (ORT CPU Range-27 reuses the existing kernel registration which supports only the common numeric types; fp16/bf16 is a tracked follow-up). float/int32 Range tests remain enabled. - js/web/docs/webgl-operators.md: regenerated via npm run build:doc; now lists CausalConvWithState and LinearAttention as unsupported WebGL ops, reflecting the opset-27 schemas pulled in by the submodule bump. Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ONNX 1.22 re-registers Range with an opset-27 schema (adds stash_type attr, widens type constraints; signature unchanged: 3 scalar inputs -> 1-D output).
- gather_fusion.cc: add 27 to GatherToSlice Range version list {1,11}->{1,11,27}; add opset-27 GatherToSliceFusion test.
- embed_layer_norm_fusion.cc: add 27 to the two Range path matchers (parent_path_3/4) so the embedding fusion still matches opset-27 models.
- coreml/nnapi/vsinpu/webnn base_op_builder.h: bump default GetMaxSupportedOpSet 25->27, matching the lockstep convention of prior ONNX-integration PRs (microsoft#26579, microsoft#25678, microsoft#24449) so opset-27 nodes are not spuriously rejected.
qdq_util.cc / layout_transformation_potentially_added_ops.h / kernel_type_str_resolver_utils.cc were checked and need no change (none reference the opset-27 ops Range/CausalConvWithState/LinearAttention).
Agent-signed-off: Developer (0ede529c) [claude-opus-4.6 via copilot]
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Completes the T6 opset-27 sweep that the prior commit (c6366eb) missed for these two files. ONNX 1.22 re-registers Range with an opset-27 schema (operator_sets.h line 1460); find_optimizer_opset_version_updates_required.py flagged: 'Newer opset found for kOnnxDomain.Range. Latest:27 Optimizer support ends at 11. File: gather_fusion.cc' - gather_fusion.cc:309: GatherToSlice Range version list {1,11}->{1,11,27}. Range-27's signature is unchanged (3 scalar inputs -> 1-D output; only adds stash_type attr and wider type constraints), and the fusion depends only on that signature, so extending the accepted SinceVersion list is safe. - graph_transform_test.cc: new OpSet-27 (int64) GatherToSliceFusion block mirroring the existing OpSet-12/OpSet-14 blocks, proving Range-27 -> Gather fuses to Slice. Agent-signed-off: Developer (0ede529c) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…0rc1) Update the CPU ai.onnx Range entry to reflect T2's split registration: a non-versioned opset-27 kernel (27+) plus the versioned [11, 26] kernel, matching the output of tools/python/gen_opkernel_doc.py against a fresh RelWithDebInfo build. The doc was updated surgically rather than via a full regen because this validation build is CPU-only (no CUDA/DML EPs available on this Linux host; DML is Windows-only). A full regen would have destructively dropped the CUDA and DmlExecutionProvider sections. The CPU-section delta was verified to be exactly this Range change by diffing the freshly generated CPU section against the committed doc. Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…WithState/LinearAttention/Range-fp16-bf16 exclusions (ONNX 1.22.0rc1, issue microsoft#28752) T7 validation showed all 62 opset-27 backend node tests (the complete set: base + _expanded, including fp16/bf16) pass on the CPU EP. These ops are ONNX function ops (and Range-27 carries a function body), so ORT expands them into primitive nodes at partition time and executes correctly despite no native kernel and the CPU Range-27 kernel registering only common numeric types. Verified via onnx_test_runner -e cpu (62/62 succeeded, output-compared) under ALLOW_RELEASED_ONNX_OPSET_ONLY=0. Removing the global filters restores backend-test coverage per design-review Minor-1. Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s work today via ONNX function-body expansion (ONNX 1.22.0rc1, issue microsoft#28752) The prior comment said float16/bfloat16 'support is a follow-up enhancement', which a maintainer could misread as fp16/bf16 Range being broken. Clarify that such models execute correctly today because Range-27 carries an ONNX function body that ORT expands at graph-partition time; the follow-up is an efficient native kernel, not a functional fix. Comment-only change; verified onnxruntime_providers recompiles and all 20 GatherToSliceFusion/EmbedLayerNormFusion optimizer tests pass. Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…27 filter comment (ONNX 1.22.0rc1, issue microsoft#28752) The opset-27 validation only exercised the CPU EP. That limitation was previously only implicit (via the 'if a non-CPU EP fails in CI' clause). Add an explicit NOTE so a future maintainer cannot miss that GPU/CUDA/DML EPs were not exercised in this validation env. Comment-only; JSONC still parses (302 entries unchanged). Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… tradition When an op's kernel set changes for the new opset (e.g. Range gaining fp16/bf16 at opset 27), version-split / bump that op's registration in EVERY EP that registers it (CPU and CUDA at minimum) in the SAME PR, so no EP silently lags behind CPU and the advertised opset boundaries stay consistent. Even an open-ended kernel that already binds the new opset (e.g. CUDA Range at SinceVersion(11)) should still be version-split for convention/clarity. Worked example cited: PR microsoft#28754 split Range [11,26]+27 in both CPU and CUDA (verified). - §1 Group B: added the all-EP tradition callout + an EP checklist (grep each provider dir; split cpu/cuda/js/rocm macro registrations; assess dml/webgpu/coreml/nnapi/etc. per their own systems; bump coreml/nnapi/vsinpu/webnn GetMaxSupportedOpSet ceilings). - §11: added a cross-EP consistency convention note distinguishing splitting (clarity) from binding-coverage (correctness). - §6 checklist: Group B line now calls out version-splitting in every EP. Agent-signed-off: Architect (bcad189c) [claude-opus-4.8 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Agent-signed-off: Architect (bcad189c) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…message Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…PSET_ONLY legs Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…efault Agent-signed-off: Developer (d307842f) [claude-opus-4.6 via copilot] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…RT iOS CI Adds onnx/onnx#8056's CMake restructure (remove onnx_core OBJECT lib; make onnx the core static lib consuming TARGET_OBJECTS:onnx_proto) on top of our pinned bc3be77b (rc1) tree, reconciled with ORT's ONNX_MINIMAL_BUILD hunk and the GroupNormalization .Deprecate removal. onnx.patch == binskim.patch (sha256 dc5a3294). NOT FOR MERGE - validation of microsoft#8056 against ORT iOS/Xcode CI only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR exists only to empirically validate whether onnx/onnx#8056 ("Fix xcode build")
resolves the iOS/macOS Xcode framework-build regression (onnx/onnx#8053) using ONNX Runtime's
iOS CI as the oracle — the only real Xcode build test available.
What this branch does
integrate-onnx-1.22.0rc1@85a11f2a88(the clean opset-27 integration PR Integrate ONNX 1.22.0 (opset 27) — issue #28752 #28754).onnx_coreOBJECT library; makesonnxthe core static lib consuming
$<TARGET_OBJECTS:onnx_proto>, with WHOLE_ARCHIVE for the py ext)onto our pinned onnx
bc3be77b(1.22.0rc1) tree viacmake/patches/onnx/onnx.patch(mirrored byte-identically into
cmake/vcpkg-ports/onnx/binskim.patch).ONNX_MINIMAL_BUILDhunk and theGroupNormalization.Deprecate()removal.the effect of Fix unit test typo in test_op_embed_layernorm.py #8056.
Goal
Confirm the 3 iOS/Xcode legs (
iOS_CI_on_Mac,React Native iOS Build,iphone_simulator)reach framework-link SUCCESS (libonnx.a produced + framework links) — the definitive
end-to-end proof that #8056 fixes the Xcode problem.
Not for merge. The real fix lands at the Phase-2 v1.22.0 re-pin once #8056 merges upstream.