Add index pages for most sections of the website. (#7369)
Section index pages are now generally available through mkdocs-material: https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#section-index-pages, so this adds them to most of our sections and updates the rest of the docs with cross references accordingly.
diff --git a/docs/README.md b/docs/README.md
index d6625e3..43bf803 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -17,5 +17,8 @@
overspecialize on a specific Linux distribution or a particular version of
Visual Studio on Windows)
+When in doubt, the guide at https://developers.google.com/style offers good
+instructions.
+
Developer documentation _can_ compromise on each of these points. Pages may
also be promoted to website/ after some refinement.
diff --git a/docs/website/docs/bindings/index.md b/docs/website/docs/bindings/index.md
new file mode 100644
index 0000000..b4c32e3
--- /dev/null
+++ b/docs/website/docs/bindings/index.md
@@ -0,0 +1,8 @@
+# Bindings
+
+IREE offers specialized sets of bindings for running compiled programs from
+various languages or with specific APIs:
+
+* [Runtime C API](./c-api.md)
+* [Compiler and runtime Python bindings](./python.md)
+* [Runtime TensorFlow Lite bindings](./tensorflow-lite.md)
diff --git a/docs/website/docs/blog/index.md b/docs/website/docs/blog/index.md
new file mode 100644
index 0000000..6d789dc
--- /dev/null
+++ b/docs/website/docs/blog/index.md
@@ -0,0 +1,7 @@
+# Blog
+
+## Latest posts from the IREE team
+
+* 2021-10-15: [CUDA backend](./2021-10-15-cuda-backend.md)
+* 2021-10-13: [Work in progress on Matrix Multiplication on CPU](./2021-10-13-mmt4d.md)
+* 2021-07-19: [TFLite Support via TOSA](./2021-07-19-tflite-tosa.md)
diff --git a/docs/website/docs/building-from-source/index.md b/docs/website/docs/building-from-source/index.md
index 92a3f1b..b0c3cad 100644
--- a/docs/website/docs/building-from-source/index.md
+++ b/docs/website/docs/building-from-source/index.md
@@ -1,5 +1,14 @@
# Building IREE from source
-Under construction.
+While IREE does offer
+[binary distributions](https://github.com/google/iree/releases) for its
+compiler tools and [Python bindings](../bindings/python.md), building from
+source is still useful when using IREE's runtime or when making changes to the
+compiler itself.
-<!-- TODO(scotttodd): write overview page and enable navigation.indexes (insiders only) -->
+## Reference pages
+
+* [Getting started](./getting-started.md)
+* [Optional features](./optional-features.md) like building the Python bindings
+* [Android cross-compilation](./android.md)
+* [RISC-V cross-compilation](./riscv.md)
diff --git a/docs/website/docs/building-from-source/optional-features.md b/docs/website/docs/building-from-source/optional-features.md
index a22d196..09a27f5 100644
--- a/docs/website/docs/building-from-source/optional-features.md
+++ b/docs/website/docs/building-from-source/optional-features.md
@@ -1,4 +1,4 @@
-# Optional Features
+# Optional features
This page details the optional features and build modes for the project.
Most of these are controlled by various CMake options, sometimes requiring
diff --git a/docs/website/docs/deployment-configurations/index.md b/docs/website/docs/deployment-configurations/index.md
new file mode 100644
index 0000000..3f3ba5e
--- /dev/null
+++ b/docs/website/docs/deployment-configurations/index.md
@@ -0,0 +1,18 @@
+# Deployment configurations
+
+IREE provides a flexible set of tools for various deployment scenarios.
+Fully featured environments can use IREE for dynamic model deployments taking
+advantage of multi-threaded hardware, while embedded systems can bypass IREE's
+runtime entirely or interface with custom accelerators.
+
+## Stable configurations
+
+* [CPU - Dylib](./cpu-dylib.md)
+* [CPU - Bare-Metal](./bare-metal.md) with minimal platform dependencies
+* [GPU - Vulkan](./gpu-vulkan.md)
+
+These are just the most stable configurations IREE supports. Feel free to reach
+out on any of IREE's
+[communication channels](../index.md#communication-channels) if you have
+questions about a specific platform, hardware accelerator, or set of system
+features.
diff --git a/docs/website/docs/index.md b/docs/website/docs/index.md
index 5786324..60e9497 100644
--- a/docs/website/docs/index.md
+++ b/docs/website/docs/index.md
@@ -68,10 +68,10 @@
1. **Import your model**
- Work in your framework of choice, then run your model through one of IREE's
- import tools.
+ Work in your [framework of choice](./ml-frameworks), then run your model
+ through one of IREE's import tools.
-2. **Select your deployment configuration**
+2. **Select your [deployment configuration](./deployment-configurations)**
Identify your target platform, accelerator(s), and other constraints.
@@ -124,7 +124,7 @@
### Running models
IREE offers a low level C API, as well as several specialized sets of
-_bindings_ for running IREE models using other languages:
+[bindings](./bindings) for running IREE models using other languages:
* [C API](bindings/c-api.md)
* [Python](bindings/python.md)
diff --git a/docs/website/docs/ml-frameworks/index.md b/docs/website/docs/ml-frameworks/index.md
new file mode 100644
index 0000000..ebdae58
--- /dev/null
+++ b/docs/website/docs/ml-frameworks/index.md
@@ -0,0 +1,18 @@
+# ML frameworks
+
+## Supported frameworks
+
+IREE supports importing models from
+
+* [TensorFlow](./tensorflow.md)
+* [TensorFlow Lite](./tensorflow-lite.md)
+* [JAX](./jax.md)
+
+Importing from PyTorch and other frameworks is planned - stay tuned!
+
+## Samples
+
+Check out the samples in IREE's
+[colab/ directory](https://github.com/google/iree/tree/main/colab) and the
+[iree-samples repository](https://github.com/google/iree-samples) for examples
+and workflow comparisons across frameworks.
diff --git a/docs/website/docs/ml-frameworks/tensorflow-lite.md b/docs/website/docs/ml-frameworks/tensorflow-lite.md
index 8db8a33..6ab1acc 100644
--- a/docs/website/docs/ml-frameworks/tensorflow-lite.md
+++ b/docs/website/docs/ml-frameworks/tensorflow-lite.md
@@ -74,15 +74,21 @@
## Samples
-| Colab notebooks | |
-| -- | -- |
-Text classification with TFLite and IREE | [](https://colab.research.google.com/github/google/iree/blob/main/colab/tflite_text_classification.ipynb)
+* The
+[tflitehub folder](https://github.com/google/iree-samples/tree/main/tflitehub)
+in the [iree-samples repository](https://github.com/google/iree-samples)
+contains test scripts to compile, run, and compare various TensorFlow Lite
+models sourced from [TensorFlow Hub](https://tfhub.dev/).
-An example smoke test of the
+* An example smoke test of the
[TensorFlow Lite C API](https://github.com/google/iree/tree/main/bindings/tflite)
is available
[here](https://github.com/google/iree/blob/main/bindings/tflite/smoke_test.cc).
+| Colab notebooks | |
+| -- | -- |
+Text classification with TFLite and IREE | [](https://colab.research.google.com/github/google/iree/blob/main/colab/tflite_text_classification.ipynb)
+
!!! todo
[Issue#3954](https://github.com/google/iree/issues/3954): Add documentation
diff --git a/docs/website/mkdocs.yml b/docs/website/mkdocs.yml
index 287524e..bb838a9 100644
--- a/docs/website/mkdocs.yml
+++ b/docs/website/mkdocs.yml
@@ -25,10 +25,7 @@
- navigation.top # Back to top button
- # Insiders only: navigation indices
- # 1) supply index.md page under each section
- # 2) list each index.md page in the `nav:` section below
- # - navigation.indexes
+ - navigation.indexes # section names can link to index.md pages
palette:
# Light mode
@@ -94,29 +91,34 @@
# Navigation with explicit ordering and nesting.
# https://www.mkdocs.org/user-guide/configuration/#nav
+# Note: may include external links and titles are optional for internal links
nav:
- Home: 'index.md'
- 'ML frameworks':
+ - 'ml-frameworks/index.md'
- TensorFlow: 'ml-frameworks/tensorflow.md'
- TensorFlow Lite: 'ml-frameworks/tensorflow-lite.md'
- JAX: 'ml-frameworks/jax.md'
- 'Deployment configurations':
+ - 'deployment-configurations/index.md'
- CPU - Dylib: 'deployment-configurations/cpu-dylib.md'
- CPU - Bare-Metal: 'deployment-configurations/bare-metal.md'
- GPU - Vulkan: 'deployment-configurations/gpu-vulkan.md'
- 'Building from source':
- # - 'building-from-source/index.md' # TODO(scotttodd): insiders + navigation.indexes
+ - 'building-from-source/index.md'
- 'building-from-source/getting-started.md'
- - Optional features: 'building-from-source/optional-features.md'
- - Android cross-compilation: 'building-from-source/android.md'
- - RISC-V cross-compilation: 'building-from-source/riscv.md'
+ - 'building-from-source/optional-features.md'
+ - 'building-from-source/android.md'
+ - 'building-from-source/riscv.md'
- 'Bindings':
+ - 'bindings/index.md'
- C API: 'bindings/c-api.md'
- Python: 'bindings/python.md'
- TensorFlow Lite: 'bindings/tensorflow-lite.md'
- 'Community':
- Projects: 'community/projects.md'
- 'Blog':
+ - 'blog/index.md'
- CUDA backend: 'blog/2021-10-15-cuda-backend.md'
- Work in progress on Matrix Multiplication on CPU: 'blog/2021-10-13-mmt4d.md'
- TFLite Support via TOSA: 'blog/2021-07-19-tflite-tosa.md'