-
Notifications
You must be signed in to change notification settings - Fork 608
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
Integrate llvm-project and bump dependencies. #12562
Conversation
} else { | ||
shape.push_back(b.create<arith::ConstantIndexOp>(getLoc(), dim)); | ||
shape.push_back((Value)b.create<arith::ConstantIndexOp>(getLoc(), dim)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must return an OpFoldResult.
From the documentation of reifyResultShapes
:
`reifiedReturnShapes` is populated with one vector per op result. Each
of those vectors contains an OpFoldResult for each dimension of the
shaped type. In case a dimension in the type is static, the
corresponding entry is an IntegerAttr. Otherwise, it is a Value. The
given builder may be used to insert ops that compute result shapes.
In this particular case here:
shape.push_back(b.getIndexAttr(dim));
(same for a few more places below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So
shape.push_back((Value)b.create<arith::ConstantIndexOp>(getLoc(), dim));
should be changed to
shape.push_back(b.getIndexAttr(dim));
?
* llvm-project: e510d0bda0876c4baa3a270dca39b95da7ec6d9e * mlir-hlo: e86610442f58b889a57bf814d75c4b50c769c2a3 * tensorflow: 67ba341c869e30ee4a89e040cd875d12b9bc666e
b72407d
to
0bccfce
Compare
llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtInterfaces.cpp
Outdated
Show resolved
Hide resolved
@hanhanW the tests fail unless I do what I had done. It was @matthias-springer's suggestion:
I am going to mark the comments as resolved. |
I think you can use |
This is very surprising. Does the getMixedTile() one also fail? According to the td file, the DispatchTensorLoadOp implements OffsetSizeAndStrideOpInterface interface.
The getMixedTile method is part of OffsetSizeAndStrideOpInterface, which returns vector of OpFoldValue... IMO, the fix should not be using casting like |
No I fixed that. There's the one unresolved comment that fails if I remove the cast. |
I'm worried that the next round integrator does not know these information. Can you add the commits that are cherry-picked to the PR description? I noticed that there are commits that are not cherry-picked from upstream, e.g., https://github.com/iree-org/iree-llvm-fork/commit/87c11e2f9c56ed302657b930dce1b8553becb8b8 and https://github.com/iree-org/iree-mhlo-fork/commit/b14e9d9b06255e4476f5698e3bfc531dec793ded Are they sent out for review yet? |
Upstream fix for |
Should I pull these two: 0a9f6b8ca3fa9449cc0accba1bc11e98d6dbc6b6, 758329dc7cd3b0da835a4f865b89003263050080 ? |
https://github.com/openxla/iree/actions/runs/4380626838/jobs/7668127668 -
Debugging this. If anyone has any insights, let me know. |
Thanks for tracking them. (also, could you please add the other comment instead of editing my comment?) |
Sorry I thought I quoted it. |
TENSORFLOW_COMMIT = "eece4dba1fc65f7977085581852b0d6e6d42f04e" | ||
TENSORFLOW_COMMIT = "67ba341c869e30ee4a89e040cd875d12b9bc666e" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(just commenting here for threading)
The change to mlir-hlo includes the stablehlo test suite (https://github.com/tensorflow/mlir-hlo/tree/master/stablehlo/stablehlo/testdata), which we might want to slice out if it increases git checkout time... this is a lot of files:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the hard work!
As mentioned on discord, I think we can land it on Monday. It's Friday. I think we don't want to have a situation where we are dealing with breakages on Friday afternoon/weekend.
* llvm-project: e510d0bda0876c4baa3a270dca39b95da7ec6d9e * mlir-hlo: e86610442f58b889a57bf814d75c4b50c769c2a3 * tensorflow: 67ba341c869e30ee4a89e040cd875d12b9bc666e Cherry-picked from LLVM: ``` commit 80074d5fc0ab3f165865b15f5bf55ffac0917bcd (HEAD -> integrate-3-8-2023, fork/integrate-3-8-2023) Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:25:15 2023 +0100 [mlir][NFC] reifyResultShapes: Add extra error checking This change adds a new helper function `mlir::reifyResultShapes` that calls the corresponding interface method and also checks the result produced by the implementation when running in debug mode. Bugs due to incorrect interface implementations can be difficult to debug. This helper function also reduces the amount of code needed at call sites: the cast to `ReifyRankedShapedTypeOpInterface` is done in the helper function. Differential Revision: https://reviews.llvm.org/D145777 commit 32b15f601de173e9511f470f7423108d3154e582 Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:24:43 2023 +0100 [mlir][tensor/linalg] Fix bug in reifyResultShapes `reifyResultShapes` should return an IntegerAttr if and only if the corresponding dimension is static. Differential Revision: https://reviews.llvm.org/D145702 commit 894555cd6adf2e0faffe713373a266650b40bb4e Author: David Green <david.green@arm.com> Date: Wed Mar 8 12:48:21 2023 +0000 [AArch64] Fix load-insert-zero patterns with i8 and negative offsets. These should have been using the LDURBi instructions where the offset is negative, as reported from the reproducer in D144086. ``` Created a new commit on iree-mlir-hlo fork: https://github.com/iree-org/iree-mhlo-fork/commit/b14e9d9b06255e4476f5698e3bfc531dec793ded
* llvm-project: e510d0bda0876c4baa3a270dca39b95da7ec6d9e * mlir-hlo: e86610442f58b889a57bf814d75c4b50c769c2a3 * tensorflow: 67ba341c869e30ee4a89e040cd875d12b9bc666e Cherry-picked from LLVM: ``` commit 80074d5fc0ab3f165865b15f5bf55ffac0917bcd (HEAD -> integrate-3-8-2023, fork/integrate-3-8-2023) Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:25:15 2023 +0100 [mlir][NFC] reifyResultShapes: Add extra error checking This change adds a new helper function `mlir::reifyResultShapes` that calls the corresponding interface method and also checks the result produced by the implementation when running in debug mode. Bugs due to incorrect interface implementations can be difficult to debug. This helper function also reduces the amount of code needed at call sites: the cast to `ReifyRankedShapedTypeOpInterface` is done in the helper function. Differential Revision: https://reviews.llvm.org/D145777 commit 32b15f601de173e9511f470f7423108d3154e582 Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:24:43 2023 +0100 [mlir][tensor/linalg] Fix bug in reifyResultShapes `reifyResultShapes` should return an IntegerAttr if and only if the corresponding dimension is static. Differential Revision: https://reviews.llvm.org/D145702 commit 894555cd6adf2e0faffe713373a266650b40bb4e Author: David Green <david.green@arm.com> Date: Wed Mar 8 12:48:21 2023 +0000 [AArch64] Fix load-insert-zero patterns with i8 and negative offsets. These should have been using the LDURBi instructions where the offset is negative, as reported from the reproducer in D144086. ``` Created a new commit on iree-mlir-hlo fork: https://github.com/iree-org/iree-mhlo-fork/commit/b14e9d9b06255e4476f5698e3bfc531dec793ded
* llvm-project: e510d0bda0876c4baa3a270dca39b95da7ec6d9e * mlir-hlo: e86610442f58b889a57bf814d75c4b50c769c2a3 * tensorflow: 67ba341c869e30ee4a89e040cd875d12b9bc666e Cherry-picked from LLVM: ``` commit 80074d5fc0ab3f165865b15f5bf55ffac0917bcd (HEAD -> integrate-3-8-2023, fork/integrate-3-8-2023) Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:25:15 2023 +0100 [mlir][NFC] reifyResultShapes: Add extra error checking This change adds a new helper function `mlir::reifyResultShapes` that calls the corresponding interface method and also checks the result produced by the implementation when running in debug mode. Bugs due to incorrect interface implementations can be difficult to debug. This helper function also reduces the amount of code needed at call sites: the cast to `ReifyRankedShapedTypeOpInterface` is done in the helper function. Differential Revision: https://reviews.llvm.org/D145777 commit 32b15f601de173e9511f470f7423108d3154e582 Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:24:43 2023 +0100 [mlir][tensor/linalg] Fix bug in reifyResultShapes `reifyResultShapes` should return an IntegerAttr if and only if the corresponding dimension is static. Differential Revision: https://reviews.llvm.org/D145702 commit 894555cd6adf2e0faffe713373a266650b40bb4e Author: David Green <david.green@arm.com> Date: Wed Mar 8 12:48:21 2023 +0000 [AArch64] Fix load-insert-zero patterns with i8 and negative offsets. These should have been using the LDURBi instructions where the offset is negative, as reported from the reproducer in D144086. ``` Created a new commit on iree-mlir-hlo fork: https://github.com/iree-org/iree-mhlo-fork/commit/b14e9d9b06255e4476f5698e3bfc531dec793ded
* llvm-project: e510d0bda0876c4baa3a270dca39b95da7ec6d9e * mlir-hlo: e86610442f58b889a57bf814d75c4b50c769c2a3 * tensorflow: 67ba341c869e30ee4a89e040cd875d12b9bc666e Cherry-picked from LLVM: ``` commit 80074d5fc0ab3f165865b15f5bf55ffac0917bcd (HEAD -> integrate-3-8-2023, fork/integrate-3-8-2023) Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:25:15 2023 +0100 [mlir][NFC] reifyResultShapes: Add extra error checking This change adds a new helper function `mlir::reifyResultShapes` that calls the corresponding interface method and also checks the result produced by the implementation when running in debug mode. Bugs due to incorrect interface implementations can be difficult to debug. This helper function also reduces the amount of code needed at call sites: the cast to `ReifyRankedShapedTypeOpInterface` is done in the helper function. Differential Revision: https://reviews.llvm.org/D145777 commit 32b15f601de173e9511f470f7423108d3154e582 Author: Matthias Springer <me@m-sp.org> Date: Fri Mar 10 11:24:43 2023 +0100 [mlir][tensor/linalg] Fix bug in reifyResultShapes `reifyResultShapes` should return an IntegerAttr if and only if the corresponding dimension is static. Differential Revision: https://reviews.llvm.org/D145702 commit 894555cd6adf2e0faffe713373a266650b40bb4e Author: David Green <david.green@arm.com> Date: Wed Mar 8 12:48:21 2023 +0000 [AArch64] Fix load-insert-zero patterns with i8 and negative offsets. These should have been using the LDURBi instructions where the offset is negative, as reported from the reproducer in D144086. ``` Created a new commit on iree-mlir-hlo fork: https://github.com/iree-org/iree-mhlo-fork/commit/b14e9d9b06255e4476f5698e3bfc531dec793ded
Cherry-picked from LLVM:
Created a new commit on iree-mlir-hlo fork:
https://github.com/iree-org/iree-mhlo-fork/commit/b14e9d9b06255e4476f5698e3bfc531dec793ded