Refresh docs/getting_started.md.
* Updated paths after several code moves
* Documented a few recently added directories
* Adjusted wording in a few places
Fixes https://github.com/google/iree/issues/435
Closes https://github.com/google/iree/pull/449
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/449 from ScottTodd:docs-getting-started 0dd05aae3f9f3af94362acbf7f14c1f54d067586
PiperOrigin-RevId: 289170810
diff --git a/docs/getting_started.md b/docs/getting_started.md
index 7e709de..dcc488d 100644
--- a/docs/getting_started.md
+++ b/docs/getting_started.md
@@ -1,45 +1,58 @@
# Getting Started
-This document provides an overview of the systems in IREE, including entry
-points to get started exploring IREE's capabilities.
+This document provides an overview of IREE's systems, including entry points to
+get started exploring IREE's capabilities.
For information on how to set up a development environment, see
[Getting Started on Windows](getting_started_on_windows.md) and
[Getting Started on Linux](getting_started_on_linux.md).
-## Code Layout
+## Project Code Layout
-[base/](../iree/base/)
+[iree/](../iree/)
+
+* Core IREE project
+
+[integrations/](../integrations/)
+
+* Integrations between IREE and other frameworks, such as TensorFlow
+
+[bindings/](../bindings/)
+
+* Language and platform bindings, such as Python
+
+[colab/](../colab/)
+
+* Colab notebooks for interactively using IREE's Python bindings
+
+## IREE Code Layout
+
+[iree/base/](../iree/base/)
* Common types and utilities used throughout IREE
-[compiler/](../iree/compiler/)
+[iree/compiler/](../iree/compiler/)
-* IREE's MLIR dialect, LLVM compiler passes, IREE module translation, etc.
+* IREE's MLIR dialects, LLVM compiler passes, module translation code, etc.
-[hal/](../iree/hal/)
+[iree/hal/](../iree/hal/)
-* **H**ardware **A**bstraction **L**ayer for IREE's runtime, containing
- implementations for different hardware and software backends
+* **H**ardware **A**bstraction **L**ayer for IREE's runtime, with
+ implementations for hardware and software backends
-[rt/](../iree/rt/)
-
-* **R**un**t**ime API for interfacing with IREE
-
-[schemas/](../iree/schemas/)
+[iree/schemas/](../iree/schemas/)
* Shared data storage format definitions, primarily using
[FlatBuffers](https://google.github.io/flatbuffers/)
-[tools/](../iree/tools/)
+[iree/tools/](../iree/tools/)
-* Assorted tools used to optimize, translate, and evaluate IREE, including
- IREE's debugger
+* Assorted tools used to optimize, translate, and evaluate IREE
-[vm/](../iree/vm/)
+[iree/vm/](../iree/vm/)
-* Bytecode **V**irtual **M**achine used to work with IREE modules and provide
- an interface for hosting applications to invoke IREE functions
+* Bytecode **V**irtual **M**achine used to work with IREE modules and invoke
+ IREE functions
## Working with IREE's Components
@@ -53,58 +66,44 @@
### iree-opt
The `iree-opt` program invokes
-[MlirOptMain](https://github.com/tensorflow/mlir/blob/master/lib/Support/MlirOptMain.cpp)
+[MlirOptMain](https://github.com/llvm/llvm-project/blob/master/mlir/lib/Support/MlirOptMain.cpp)
to run some set of IREE's optimization passes on a provided .mlir input file.
Test .mlir files that are checked in typically include a `RUN` block at the top
of the file that specifies which passes should be performed and if `FileCheck`
should be used to test the generated output.
For example, to run some passes on the
-[reshape.mlir](../iree/compiler/Translation/SPIRV/test/reshape.mlir) test file
-with Bazel on Linux, use this command:
+[reshape.mlir](../iree/compiler/Translation/SPIRV/XLAToSPIRV/test/reshape.mlir)
+test file with Bazel on Linux, use this command:
```shell
$ bazel run //iree/tools:iree-opt -- \
-split-input-file \
- -convert-iree-to-spirv \
+ -iree-index-computation \
-simplify-spirv-affine-exprs=false \
+ -convert-iree-to-spirv \
-verify-diagnostics \
- $PWD/iree/compiler/Translation/SPIRV/test/reshape.mlir
+ $PWD/iree/compiler/Translation/SPIRV/XLAToSPIRV/test/reshape.mlir
```
### iree-translate
-The `iree-translate` program invokes
-[mlir-translate](https://github.com/tensorflow/mlir/blob/master/tools/mlir-translate/mlir-translate.cpp)
-to translate from a .mlir input file into an IREE module.
+The `iree-translate` program translates from a .mlir input file into an IREE
+module.
-For example, to translate `simple_compute_test.mlir` to an IREE module with
-Bazel on Linux, use this command:
+For example, to translate `gather.mlir` to an IREE module with Bazel on Linux,
+use this command:
```shell
$ bazel run //iree/tools:iree-translate -- \
- -mlir-to-iree-module \
- $PWD/iree/samples/hal/simple_compute_test.mlir \
+ -iree-mlir-to-vm-bytecode-module \
+ $PWD/test/e2e/xla/gather.mlir \
-o /tmp/module.fb
```
-### iree-run-module
-
-The `iree-run-module` program takes an already translated IREE module as input
-and executes an exported main function using the provided inputs.
-
-This program can be used in sequence with `iree-translate` to translate a .mlir
-file to an IREE module and then execute it. Here is an example command that runs
-the `simple_mul` function in `simple_compute_test.mlir`.
-
-```shell
-$ bazel build -c opt //iree/tools:iree-translate //iree/tools:iree-run-module
-$ ./bazel-bin/iree/tools/iree-run-module \
- --main_module=/tmp/module.fb \
- --main_function=simple_mul \
- --input_values="4xf32=1 2 3 4
- 4xf32=5 6 7 8"
-```
+Custom translations may also be layered on top of `iree-translate` - see
+[iree/samples/custom_modules/dialect](../iree/samples/custom_modules/dialect)
+for a sample.
### iree-run-mlir
@@ -114,5 +113,16 @@
For example, to execute the contents of a test .mlir file, use this command:
```shell
-$ bazel run //iree/tools:iree-run-mlir -- $PWD/test/e2e/scalars.mlir
+$ bazel run //iree/tools:iree-run-mlir -- $PWD/test/e2e/xla/reverse.mlir
+```
+
+### iree-dump-module
+
+The `iree-dump-module` program prints the contents of an IREE module FlatBuffer
+file.
+
+For example:
+
+```shell
+$ bazel run //iree/tools:iree-dump-module -- /tmp/module.fb
```