Repository navigation
[Fix][Relax] Preserve stack axes in ConvertLayout - #20989
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.
Closes #20902.
Closes #20921.
InferLayoutStackinserted a syntheticSinto the input's layout and looked up the stack axis in the input rank. A valid negative axis could fail before normalization. A valid positive axis could also fail later because the synthetic label is missing from the canonical output layout.Normalize the axis against the output rank, relabel the existing dimensions in that rank, then apply the input permutation and insert the stack axis. Use an unblocked input layout when the producer uses a split layout, following the rank-insertion policy in
expand_dims.Validation on
23a6dbe, Linux x86-64, with the native compiler rebuilt for each version.test_transform_convert_layout.py,test_transform_legalize_ops_manipulate.py, andtest_op_manipulate.pygive 253 passes and two skips.Codex assisted with the patch and validation.