Collapse LinalgExt into the main source tree (#16407)

The revision moves LinalgExt to compiler/Dialect, and fixes styles. The
python binding support is removed. It does not trigger any issues at
this moment. We can add it back if needed.

It retires an "unused" LinalgExt op (i.e.,`do_not_dce_operands`), which
is only used by TransformInterpreter. The TransformInterpreter.cpp
should be deprecated soon because we already have transform dialect
setup in IREE main tree.

The step to generate the revision:


https://github.com/openxla/iree/pull/16407/commits/502ca323af981ed8b2313fa958b3002b04115f6f:
Retire LinalgExt do_not_dce_operands op.


https://github.com/openxla/iree/pull/16407/commits/fddc0e51546e280c603d68070d6fee9cc7149be3:
Run `git mv` to move files; manually create BILD.bazel


https://github.com/openxla/iree/pull/16407/commits/66ce8a2d84888ad0962221e9bf5e02c17cf62c1e:
Remove LinalgExt from `llvm-external-projects/iree-dialects`.


https://github.com/openxla/iree/pull/16407/commits/37be17a27ff3258ad4763828ce9bfd214d752136
Update BUILD.bazel files with below commands:

```
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtDialect/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/IR/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtTransforms/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/Transforms/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtUtils/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/Utils/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtPasses/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/Transforms/g" **/BUILD.bazel
sed -i '' -e "s/llvm-external-projects\/iree-dialects:IREELinalgExtTransformOps/compiler\/src\/iree\/compiler\/Dialect\/LinalgExt\/TransformExtensions:LinalgExtExtensions/g" **/BUILD.bazel
```


https://github.com/openxla/iree/pull/16407/commits/a8b6dd0de47b28e88eddaca1b6a1c07d10b82f0d:
Manually fix BUILD and CMakeLists.txt
- They are not modeled by bazel_to_cmake.py
- LinalgExt/Transforms/BUILD.bazel missed a dep


https://github.com/openxla/iree/pull/16407/commits/e89ac64c73524527b62df0a3ec1d7cbc73309699:
Run below commands to fix includes.

```
sed -i '' -e "s/iree-dialects\/Dialect\/LinalgExt/iree\/compiler\/Dialect\/LinalgExt/g" **/*.td
sed -i '' -e "s/iree-dialects\/Dialect\/LinalgExt/iree\/compiler\/Dialect\/LinalgExt/g" **/*.h
sed -i '' -e "s/iree-dialects\/Dialect\/LinalgExt/iree\/compiler\/Dialect\/LinalgExt/g" **/*.cpp
sed -i '' -e "s/Dialect\/LinalgExt\/Passes/Dialect\/LinalgExt\/Transforms/g" **/*.cpp
sed -i '' -e "s/Dialect\/LinalgExt\/Passes/Dialect\/LinalgExt\/Transforms/g" **/*.h
sed -i '' -e "s/Dialect\/LinalgExt\/TransformOps\/LinalgExtTransformOps/Dialect\/LinalgExt\/TransformExtensions\/LinalgExtExtensionsOps/g" **/*.h
sed -i '' -e "s/Dialect\/LinalgExt\/TransformOps\/LinalgExtTransformOps/Dialect\/LinalgExt\/TransformExtensions\/LinalgExtExtensionsOps/g" **/*.cpp
```


https://github.com/openxla/iree/pull/16407/commits/c10e8ef5a7ee70fd155426915915c4bf3d9b1e37:
Replace iree-dialects-opt with iree-opt for LinalgExt tests


https://github.com/openxla/iree/pull/16407/commits/37a315b3452f63239a29f122f99de307f937a910:
Add iree. prefix to LinalgExtExtensionsOps.td and fix tests


https://github.com/openxla/iree/pull/16407/commits/f236ddb993ff1784ce5db4a653870b7f95d98307:
Run `buildifier compiler/**/BUILD.bazel`


https://github.com/openxla/iree/pull/16407/commits/1d10a1ebd29c9199e4f88c5d6bd8510730d844c7:
Run clang-format to fix headers


https://github.com/openxla/iree/pull/16407/commits/cdbf3ead407f49b9b45781314cadbb81d28a7002:
Fixed indef in headers with below commands.

```
sed -i '' -e "s/IREE_DIALECTS/IREE_COMPILER/g" **/*.h
```

Manually fixes the style:

-
https://github.com/openxla/iree/pull/16407/commits/4f8cf66948192f4d96e5110f8ec37fa65ef23551:
Add braces on simple single-statement bodies of if/else/loop
-
https://github.com/openxla/iree/pull/16407/commits/ee6236f4d28da26c9269e827665cc0ecc160de53:
Changing compiler namespaces to the new single-line syntax.
-
https://github.com/openxla/iree/pull/16407/commits/61e0fa9d222a307dfade1b654846a9dea03272af:
Use structured binding for llvm::enumerate
-
https://github.com/openxla/iree/pull/16407/commits/be5327d2b305b1249db75e9bab2e18cc0879d21d:
Replace llvm::zip with llvm::zip_equal

---------

Co-authored-by: Scott Todd <Scott.Todd@amd.com>
226 files changed
tree: ff3ece7fc0405d5e81ab0a406c1207c7b8b66c80
  1. .devcontainer/
  2. .github/
  3. build_tools/
  4. compiler/
  5. docs/
  6. experimental/
  7. integrations/
  8. lib/
  9. llvm-external-projects/
  10. runtime/
  11. samples/
  12. tests/
  13. third_party/
  14. tools/
  15. .bazel_to_cmake.cfg.py
  16. .bazelignore
  17. .bazelrc
  18. .bazelversion
  19. .clang-format
  20. .dockerignore
  21. .git-blame-ignore-revs
  22. .gitignore
  23. .gitmodules
  24. .yamllint.yml
  25. AUTHORS
  26. BUILD.bazel
  27. CITATION.cff
  28. CMakeLists.txt
  29. configure_bazel.py
  30. CONTRIBUTING.md
  31. LICENSE
  32. README.md
  33. WORKSPACE
README.md

IREE: Intermediate Representation Execution Environment

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.

CI Status IREE Discord Status

Project Status

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!

Communication Channels

Related Project Channels

  • MLIR topic within LLVM Discourse: IREE is enabled by and heavily relies on MLIR. IREE sometimes is referred to in certain MLIR discussions. Useful if you are also interested in MLIR evolution.

Architecture Overview

IREE Architecture IREE Architecture

See our website for more information.

Presentations and Talks

License

IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.