Repository navigation
Fix ConcatFromSequence lowering for opsets 11 and 12 - #3161
Open
DiadkoShmek wants to merge 1 commit into
Open
DiadkoShmek wants to merge 1 commit into
DiadkoShmek wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
optimizer.optimizecan turn a valid opset-11/12SequenceConstruct→ConcatFromSequence(new_axis=1)model into an invalid graph. The replacement currently uses the two-input form ofUnsqueeze, while these opsets require anaxesattribute. Both ONNX full checking and ONNX Runtime reject the optimized graph.Use the attribute form before opset 13 and retain the existing axes-input form for newer models. Pass the optimizer's effective model-opset map through its existing state so nested
Ifgraphs inherit the correct version without requiring their own imports.This covers the model target version, nested graphs, and the tested same-version local functions. Mixed model/function imports (11/18 and 18/11) retain a pre-existing compatibility failure in both baseline and candidate and are outside this repair.
A minimal reproduction is:
Validation:
Ifbranches and reuse of the same pass across different target versions retain the expected lowering and values.The local runtime checks use ONNX 1.18.0 and ONNX Runtime 1.20.1 CPU. The full Nox/framework/nightly/docs matrix was not run.
This is author-directed, AI-assisted work. The author sets direction, owns the submission and takes responsibility for follow-up.