blob: 6781057b6412a7bc7365d488097d0edfc5b91b26 [file] [log] [blame] [view]
Lei Zhangc4cfa792020-04-08 14:55:41 -07001# IREE: Intermediate Representation Execution Environment
Ben Vanik363fa072019-09-19 10:26:25 -07002
Lei Zhangc4cfa792020-04-08 14:55:41 -07003IREE (**I**ntermediate **R**epresentation **E**xecution **E**nvironment,
4pronounced as "eerie") is an MLIR-based end-to-end compiler that lowers ML
5models to a unified IR optimized for real-time mobile/edge inference against
6heterogeneous hardware accelerators. IREE also provides flexible deployment
7solutions for the compiled ML models.
Ben Vanik363fa072019-09-19 10:26:25 -07008
Lei Zhangc4cfa792020-04-08 14:55:41 -07009#### Project Status
Ben Vanik363fa072019-09-19 10:26:25 -070010
Lei Zhangc4cfa792020-04-08 14:55:41 -070011IREE is still in its early phase. We have settled down on the overarching
12infrastructure and are actively improving various software components as well as
phoenix-meadowlarkf81eef32020-06-10 11:02:21 -070013project logistics. It is still quite far from ready for everyday use and is made
14available without any support at the moment. With that said, we welcome any kind
15of feedback on any [communication channels](#communication-channels)!
Ben Vanik363fa072019-09-19 10:26:25 -070016
Stella Laurenzo1121c5f2020-03-18 15:01:20 -070017## Communication Channels
Geoffrey Martin-Nobleec3c4a62019-12-18 14:47:42 -080018
Scott Toddfa4e3732020-03-24 10:40:51 -070019* [GitHub Issues](https://github.com/google/iree/issues): Preferred for
Lei Zhangc4cfa792020-04-08 14:55:41 -070020 specific technical issues and coordination on upcoming features.
Scott Toddfa4e3732020-03-24 10:40:51 -070021* [Google IREE Discord Server](https://discord.gg/26P4xW4): The core team and
Lei Zhangc4cfa792020-04-08 14:55:41 -070022 collaborators coordinate daily development here; good for low-latency
23 communication.
Stella Laurenzo1121c5f2020-03-18 15:01:20 -070024* [Google Groups Email List](https://groups.google.com/forum/#!forum/iree-discuss):
Lei Zhangc4cfa792020-04-08 14:55:41 -070025 Good for general and low-priority discussion.
Stella Laurenzo1121c5f2020-03-18 15:01:20 -070026
Lei Zhangc4cfa792020-04-08 14:55:41 -070027#### Related Project Channels
Stella Laurenzo1121c5f2020-03-18 15:01:20 -070028
29* [MLIR topic within LLVM Discourse](https://llvm.discourse.group/c/llvm-project/mlir/31):
Lei Zhangc4cfa792020-04-08 14:55:41 -070030 IREE is enabled by and heavily relies on [MLIR](https://mlir.llvm.org). IREE
31 sometimes is referred to in certain MLIR discussions. Useful if you are also
32 interested in MLIR evolution.
33
34## Getting Started
35
36For development, IREE supports both Bazel and CMake on Windows and Linux. We are
37working on enabling macOS support. For deployment, IREE aims to additionally
38cover Android and iOS.
39
Phoenix Meadowlark84f52e12020-07-24 15:25:53 -070040Please see the [Getting Started](https://google.github.io/iree/get-started)
Copybara-Service9580b5f2020-07-23 12:56:17 -070041pages on IREE's [documentation hub](https://google.github.io/iree) to configure,
Lei Zhangc4cfa792020-04-08 14:55:41 -070042compile, and run IREE in your favorite development environment!
43
44## Documentation and Talks
45
46IREE hosts all its documentation and project status dashboards on
47[GitHub Pages](https://google.github.io/iree). We are still building up the
48website; please feel free to
49[create issues](https://github.com/google/iree/issues) for the documentation
50you'd like to see!
51
52We also have some public talks that explain IREE's concepts and architecture:
53
54* 2020-03-18: Interactive HAL IR Walkthrough (Ben Vanik and core team)
Stella Laurenzo054c7572020-05-29 08:26:24 -070055 ([recording](https://drive.google.com/file/d/1_sWDgAPDfrGQZdxAapSA90AD1jVfhp-f/view?usp=sharing))
Lei Zhangc4cfa792020-04-08 14:55:41 -070056* 2020-01-31: End-to-end MLIR Workflow in IREE
57 ([recording](https://drive.google.com/open?id=1os9FaPodPI59uj7JJI3aXnTzkuttuVkR)
58 and
59 [slides](https://drive.google.com/open?id=1RCQ4ZPQFK9cVgu3IH1e5xbrBcqy7d_cEZ578j84OvYI))
60
61## Architecture and Goals
62
63IREE adopts a _holistic_ approach towards ML model compilation: the IR produced
64contains both the _scheduling_ logic, required to communicate data dependencies
65to low-level parallel pipelined hardware/API like Vulkan, and the _execution_
66logic, encoding dense computation on the hardware in the form of
67hardware/API-specific binaries like SPIR-V.
68
69The architecture of IREE is best illustrated by the following picture:
70
Lei Zhangc12c0cd2020-07-23 08:21:45 -040071![IREE Architecture](./docs/iree_architecture.svg)
Lei Zhangc4cfa792020-04-08 14:55:41 -070072
73Being compilation-based means IREE does not have a traditional runtime that
phoenix-meadowlarkf81eef32020-06-10 11:02:21 -070074dispatches "ops" to their fat kernel implementations. What IREE provides is a
Lei Zhangc4cfa792020-04-08 14:55:41 -070075toolbox for different deployment scenarios. It scales from running generated
76code on a particular API (such as emitting C code calling external DSP kernels),
77to a HAL (**H**ardware **A**bstraction **L**ayer) that allows the same generated
78code to target multiple APIs (like Vulkan and Direct3D 12), to a full VM
79allowing runtime model loading for flexible deployment options and heterogeneous
80execution.
81
82IREE aims to
83
84* Support advanced models on mobile/edge devices. Dynamic shapes, dynamic flow
85 control, dynamic multi-model dispatch, streaming models, tree-based search
86 algorithms, and other are all good examples of exciting ML evolution. We are
87 trying to build IREE from the ground-up to enable these models and run them
88 efficiently on modern hardware, especially on mobile/edge devices.
89* Demonstrate MLIR's ability to develop non-traditional ML compiler backends
90 and runtimes. MLIR enables IREE's holistic approach of focusing on the math
91 being performed and how that math is scheduled rather than graphs of "ops".
92* Embrace standard-based ML via Vulkan. The graphics world is shifting towards
phoenix-meadowlarkf81eef32020-06-10 11:02:21 -070093 favoring modern explicit APIs for performance and predictability and Vulkan
Lei Zhangc4cfa792020-04-08 14:55:41 -070094 is emerging as the "compatibility" layer. We would love to allow hardware
95 vendors to be able to make ML efficient on their hardware without the need
96 for bespoke runtimes and special access. We also would love to let
97 developers and users utilize all the hardware available on as many platforms
98 as possible.
99
100## Roadmap and Milestones
101
102IREE is still at its early stage; we have lots of exciting future plans. Please
Lei Zhangc12c0cd2020-07-23 08:21:45 -0400103check out the [long-term design roadmap](./docs/design_roadmap.md) and
104[short-term focus areas](./docs/milestones.md).
Lei Zhangc4cfa792020-04-08 14:55:41 -0700105
106We use [GitHub Projects](https://github.com/google/iree/projects) to track
107various IREE components and
108[GitHub Milestones](https://github.com/google/iree/milestones) for major
109features and quarterly plans. Please check out for updated information.
Geoffrey Martin-Nobleec3c4a62019-12-18 14:47:42 -0800110
Geoffrey Martin-Noble65e115b2019-12-27 18:03:15 -0800111## Build Status
112
Geoffrey Martin-Noble75f91f32020-08-21 09:52:10 -0700113CI System | Build System | Platform | Architecture | Component | Status
114:-------: | :----------: | :------: | :-------------: | :------------------: | :----:
Geoffrey Martin-Nobledbb222f2020-09-18 09:23:40 -0700115Kokoro | Bazel | Linux | x86 | Core | [![kokoro_status_bazel_linux_x86_core](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-swiftshader/core/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-swiftshader/core/main_result.html)
116Kokoro | Bazel | Linux | x86 | Bindings | [![kokoro_status_bazel_linux_x86_bindings](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-swiftshader/bindings/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-swiftshader/bindings/main_result.html)
Geoffrey Martin-Noble75f91f32020-08-21 09:52:10 -0700117Kokoro | Bazel | Linux | x86-swiftshader | Integrations | [![kokoro_status_bazel_linux_x86-swiftshader_integrations](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-swiftshader/integrations/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-swiftshader/integrations/main_result.html)
118Kokoro | Bazel | Linux | x86-turing | Integrations | [![kokoro_status_bazel_linux_x86-turing_integrations](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-turing/integrations/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/bazel/linux/x86-turing/integrations/main_result.html)
Geoffrey Martin-Noble75f91f32020-08-21 09:52:10 -0700119Kokoro | CMake | Linux | x86-swiftshader | Core + Bindings | [![kokoro_status_cmake_linux_x86-swiftshader](https://storage.googleapis.com/iree-oss-build-badges/cmake/linux/x86-swiftshader/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/cmake/linux/x86-swiftshader/main_result.html)
120Kokoro | CMake | Linux | x86-turing | Core + Bindings | [![kokoro_status_cmake_linux_x86-turing](https://storage.googleapis.com/iree-oss-build-badges/cmake/linux/x86-turing/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/cmake/linux/x86-turing/main_result.html)
121Kokoro | CMake | Android | arm64-v8a | Runtime (build only) | [![kokoro_status_cmake_android_arm64-v8a](https://storage.googleapis.com/iree-oss-build-badges/cmake/android/arm64-v8a/main_status.svg)](https://storage.googleapis.com/iree-oss-build-badges/cmake/android/arm64-v8a/main_result.html)
122BuildKite | CMake | Android | arm64-v8a | Runtime | [![buildkite-status-cmake-android-arm](https://badge.buildkite.com/a73df0ba9f4aa132650dd6676bc1e6c20d3d99ed6b24db2179.svg?branch=main)](https://buildkite.com/iree/iree-android-arm64-v8a/builds?branch=main)
Geoffrey Martin-Noble65e115b2019-12-27 18:03:15 -0800123
Ben Vanik363fa072019-09-19 10:26:25 -0700124## License
125
126IREE is licensed under the terms of the Apache license. See [LICENSE](LICENSE)
127for more information.