Repository navigation
Merge main -> google - #5637
Merged
copybara-service[bot] merged 7 commits intoApr 27, 2021
Merged
Merge main -> google#5637
Conversation
For linalg on tensors path we use cyclic distribution to invocations in one workgroup.
This commit moves cooperative matrix support to the Linalg on tensor path. A few improvements are done along the way to have a better pipeline structure: * Cooperative matrix support previously were scattered across various passes; now they are scoped into the same pass for better isolation. * Now the handling of cooperative matrix is at a more proper layer. Cooperative matrix is at a large vector semantics level. We try to lower vector transfer read/write/arithmetic ops when we are still at that level with the necessary high-level information; not trying to left them "fall through" to the final converting to SPIR-V stage. * Now the lowering is more progressive. This commit leverages new constructs like unrealized_conversion_cast recently added in core to bridge the gap and makes SPIR-V lowering more modular and progressive: cooperative matrix part is first handled, with the rest latter converted and those cast ops cancelled out. Upstream SPIR-V support is expected to grow more towards this direction. The majority of the code in the new VectorToCooperativeMatrixPass.cpp file is moved from ConvertToSPIRVPass.cpp, with modifications to properly use type conversion integrated into dialect conversion framework.
The following operations can be lowered to flow.tensor. ops. linalg.tensor_reshape -> flow.tensor.reshape : Once all reshapes can be folded away, the remaining reshapes only exist at the boundaries of dispatch regions. These are better off converted to flow.tensor.reshape so that they could become no-ops when lowered to the hal layer. subtensor -> flow.tensor.slice. A subtensor operation can be lowered to a flow.tensor.slice operation in some cases. This can become a no-op in many cases. subtensor_insert -> flow.tensor.update. A subtensor_insert operation can be lowered to a flow.tensor.update operation which will allow for doign in-place updates. This will eliminate some dispatch regions that do not need to be created.
…r simulating release runs.
* For real this time. * Fixes iree-org#5617.
ThomasRaoux
force-pushed
the
main-to-google
branch
from
April 27, 2021 15:05
73921fb to
5bb9d9b
Compare
This was referenced Apr 27, 2021
Closed
Closed
GMNGeoffrey
added a commit
that referenced
this pull request
Apr 27, 2021
PiperOrigin-RevId: 370703231
Merged
ThomasRaoux
added a commit
that referenced
this pull request
Apr 27, 2021
* 0dbcf67 Merge pull request #5637 from ThomasRaoux:main-to-google * 7f40d6c Synchronize submodules with LLVM at llvm/llvm-project@f8de9aa * fe4ce06 Integrate LLVM at llvm/llvm-project@f8de9aa * 8f74952 Add support for returning empty sequences in the IREE-JAX frontend. * 9082ada Integrate LLVM at llvm/llvm-project@494e771
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.
flow.tensorops (Add more patterns to lower toflow.tensorops #5576)