Skip to content

Pick fix for matrix transpose hoisting. #8175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

fhahn
Copy link

@fhahn fhahn commented Feb 12, 2024

No description provided.

Factor our forward shape computation for a given instruction. This
allows re-use in a follow-up fix.

(cherry-picked from 70caa31)
Add extra test coverage for transpose lifting using
-matrix-print-after-transpose-opt.

The added tests show a mis-compile.

(cherry-picked from 673e5e3)
Row and column arguments for matrix_transpose indicate the shape of the
operand. When hoisting the transpose to the result of the add, the add
operates on the original operand's shape, and so does the hoisted
transpose.

This patch also adds an assert that the shape for the original add and
the transpose match, as well as the shape of the new add matches the
cached shape for it.

The assert could potentially be moved to
updateShapeAndReplaceAllUsesWith.

(cherry-picked from dbe4143)
@fhahn
Copy link
Author

fhahn commented Feb 12, 2024

@swift-ci please test

@fhahn
Copy link
Author

fhahn commented Feb 12, 2024

@swift-ci please test llvm

@fhahn fhahn merged commit e238ee5 into swiftlang:stable/20230725 Feb 13, 2024
@fhahn fhahn deleted the matrix-hoist-transpose-fix branch February 13, 2024 09:37
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.

1 participant