commit | 9fa29980f2edf6a9f41e4379a96da0cb91a6f642 | [log] [tgz] |
---|---|---|
author | NatashaKnk <natashaknk@google.com> | Fri Aug 04 10:55:31 2023 -0700 |
committer | GitHub <noreply@github.com> | Fri Aug 04 10:55:31 2023 -0700 |
tree | 2449875cd087e63a784600c73919abcc9f093d27 | |
parent | 3592c594ae611115987b943019ebbbaf61efce9b [diff] |
Add canonicalizer that reorders unary elementwise ops and shape manipulation ops. (#14494) The pass identifies shape manipulation operations (`reshape`, `transpose`, `broadcast`) that feed into unary elementwise operations and swaps their order. Since elementwise ops do not manipulate the input shape (and there is no interaction between the elements), the reordering doesn't affect the result. This enables a future PR where some consecutive shape manipulation operations should be collapsed together into a single operation. `Broadcast_in_dim` is not included in this PR as the same thing is done for it as part of an existing `StablehloToStablehlo` pass. In the future, we might want to consider merging/more clearly defining the difference between `Canonicalizations.cpp` and `StablehloToStablehlo.cpp` files, as at the moment their function is almost indistinguishable in some cases.
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.