Skip to content

Commit

Permalink
Cleanup doc reference of iree/samples/ --> samples/ (#8975)
Browse files Browse the repository at this point in the history
Reflect #8958
  • Loading branch information
hcindyl authored Apr 23, 2022
1 parent a7b981d commit 63fd39f
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/developers/best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you do externalize state, try to pack that state into a limited number of
arguments.

See the
[variables and state](https://github.com/google/iree/tree/main/iree/samples/variables_and_state)
[variables and state](https://github.com/google/iree/tree/main/samples/variables_and_state)
sample for further guidance on tracking and using state.

### Limit uses of dynamic shapes
Expand All @@ -40,7 +40,7 @@ like batch index or timestamp are safer uses of dynamic shapes than faster
varying dimensions like the x/y/channel dimensions of images.

See the
[dynamic shapes](https://github.com/google/iree/tree/main/iree/samples/dynamic_shapes)
[dynamic shapes](https://github.com/google/iree/tree/main/samples/dynamic_shapes)
sample for further guidance on using dynamic shapes.

## Practices for compilation settings
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/developing_iree/benchmarking.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To use `iree-benchmark-module`, generate an IREE module for the target backend:
$ bazel run //iree/tools:iree-compile -- \
-iree-mlir-to-vm-bytecode-module \
-iree-hal-target-backends=vmvx \
$PWD/iree/samples/models/simple_abs.mlir \
$PWD/samples/models/simple_abs.mlir \
-o /tmp/module.fb
```

Expand Down
10 changes: 5 additions & 5 deletions docs/developers/developing_iree/developer_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $ ../iree-build/iree/tools/iree-opt \
```

Custom passes may also be layered on top of `iree-opt`, see
[iree/samples/custom_modules/dialect](https://github.com/google/iree/blob/main/iree/samples/custom_modules/dialect)
[samples/iree_custom_modules/dialect](https://github.com/google/iree/blob/main/samples/iree_custom_modules/dialect)
for a sample.

### iree-compile
Expand All @@ -113,7 +113,7 @@ For example, to translate `simple.mlir` to an IREE module:
```shell
$ ../iree-build/iree/tools/iree-compile \
-iree-hal-target-backends=vmvx \
$PWD/iree/samples/models/simple_abs.mlir \
$PWD/samples/models/simple_abs.mlir \
-o /tmp/simple_abs_vmvx.vmfb
```

Expand All @@ -131,7 +131,7 @@ see "translation" in
for more information.

Custom translations may also be layered on top of `iree-translate`, see
[iree/samples/custom_modules/dialect](https://github.com/google/iree/blob/main/iree/samples/custom_modules/dialect)
[samples/iree_custom_modules/dialect](https://github.com/google/iree/blob/main/samples/iree_custom_modules/dialect)
for a sample.

### iree-run-module
Expand Down Expand Up @@ -185,11 +185,11 @@ does some additional work that usually must be explicit, like marking every
function as exported by default and running all of them.

For example, to execute the contents of
[iree/samples/models/simple_abs.mlir](https://github.com/google/iree/blob/main/iree/samples/models/simple_abs.mlir):
[samples/models/simple_abs.mlir](https://github.com/google/iree/blob/main/samples/models/simple_abs.mlir):

```shell
$ ../iree-build/iree/tools/iree-run-mlir \
$PWD/iree/samples/models/simple_abs.mlir \
$PWD/samples/models/simple_abs.mlir \
-function-input="f32=-2" \
-iree-hal-target-backends=vmvx
```
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/get_started/building_with_bazel_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ $ ./bazel-bin/iree/tools/iree-compile --help
```

Translate a
[MLIR file](https://github.com/google/iree/blob/main/iree/samples/models/simple_abs.mlir)
[MLIR file](https://github.com/google/iree/blob/main/samples/models/simple_abs.mlir)
and execute a function in the compiled module:

```shell
$ ./bazel-bin/iree/tools/iree-run-mlir ./iree/samples/models/simple_abs.mlir \
$ ./bazel-bin/iree/tools/iree-run-mlir ./samples/models/simple_abs.mlir \
-function-input="f32=-2" -iree-hal-target-backends=vmvx -print-mlir
```
4 changes: 2 additions & 2 deletions docs/developers/get_started/building_with_bazel_macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ $ ./bazel-bin/iree/tools/iree-compile --help
```

Translate a
[MLIR file](https://github.com/google/iree/blob/main/iree/samples/models/simple_abs.mlir)
[MLIR file](https://github.com/google/iree/blob/main/samples/models/simple_abs.mlir)
and execute a function in the compiled module:

```shell
$ ./bazel-bin/iree/tools/iree-run-mlir ./iree/samples/models/simple_abs.mlir \
$ ./bazel-bin/iree/tools/iree-run-mlir ./samples/models/simple_abs.mlir \
-function-input="f32=-2" -iree-hal-target-backends=vmvx -print-mlir
```
2 changes: 1 addition & 1 deletion docs/developers/get_started/building_with_bazel_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Check out what was built:
```

Translate a
[MLIR file](https://github.com/google/iree/blob/main/iree/samples/models/simple_abs.mlir)
[MLIR file](https://github.com/google/iree/blob/main/samples/models/simple_abs.mlir)
and execute a function in the compiled module:

```powershell
Expand Down
2 changes: 1 addition & 1 deletion docs/website/docs/bindings/c-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ API header files are organized by runtime component:
| [iree/vm/api.h](https://github.com/google/iree/blob/main/iree/vm/api.h) | VM APIs: loading modules, I/O, calling functions |
| [iree/hal/api.h](https://github.com/google/iree/blob/main/iree/hal/api.h) | HAL APIs: device management, synchronization, accessing hardware features |

The [iree/samples/](https://github.com/google/iree/tree/main/iree/samples)
The [samples/](https://github.com/google/iree/tree/main/iree/samples)
directory demonstrates several ways to use IREE's C API.

## Prerequisites
Expand Down
2 changes: 1 addition & 1 deletion docs/website/docs/building-from-source/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Invoke the host compiler tools to produce a bytecode module flatbuffer:
../iree-build/install/bin/iree-compile \
-iree-mlir-to-vm-bytecode-module \
-iree-hal-target-backends=vmvx \
iree/samples/models/simple_abs.mlir \
samples/models/simple_abs.mlir \
-o /tmp/simple_abs_vmvx.vmfb
```

Expand Down
4 changes: 2 additions & 2 deletions docs/website/docs/building-from-source/riscv.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cmake --build ../iree-build-riscv/
!!! note
The following instructions are meant for the RISC-V 64-bit Linux
target. For the bare-metal target, please refer to
[simple_embedding](https://github.com/google/iree/blob/main/iree/samples/simple_embedding)
[simple_embedding](https://github.com/google/iree/blob/main/samples/iree_simple_embedding)
to see how to build a ML workload for a bare-metal machine.

Set the path to qemu-riscv64 Linux emulator binary in the `QEMU_BIN` environment
Expand All @@ -106,7 +106,7 @@ Invoke the host compiler tools to produce a bytecode module flatbuffer:
../iree-build/install/bin/iree-compile \
-iree-mlir-to-vm-bytecode-module \
-iree-hal-target-backends=vmvx \
iree/samples/models/simple_abs.mlir \
samples/models/simple_abs.mlir \
-o /tmp/simple_abs_vmvx.vmfb
```

Expand Down
8 changes: 4 additions & 4 deletions docs/website/docs/deployment-configurations/bare-metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ iree-compile \
-iree-hal-target-backends=dylib-llvm-aot \
-iree-llvm-target-triple=x86_64-pc-linux-elf \
-iree-llvm-debug-symbols=false \
iree/samples/models/simple_abs.mlir \
samples/models/simple_abs.mlir \
-o /tmp/simple_abs_dylib.vmfb

```
Expand All @@ -59,7 +59,7 @@ You can replace the MLIR file with the other MLIR model files, following the

### Compiling the bare-metal model for static-library support

See the [static_library](https://github.com/google/iree/tree/main/iree/samples/static_library)
See the [static_library](https://github.com/google/iree/tree/main/samples/iree_static_library)
demo sample for an example and instructions on running a model with IREE's
`static_library_loader`.

Expand Down Expand Up @@ -89,7 +89,7 @@ enable the synchronous HAL drivers with `set(IREE_HAL_DRIVER_VMVX_SYNC ON)` and
* `set(IREE_BUILD_TESTS OFF)`: Disable tests until IREE supports running them on
bare-metal platforms
* `set(IREE_BUILD_SAMPLES ON)`: Build
[simple_embedding](https://github.com/google/iree/tree/main/iree/samples/simple_embedding)
[simple_embedding](https://github.com/google/iree/tree/main/samples/iree_simple_embedding)
example

!!! todo
Expand Down Expand Up @@ -121,6 +121,6 @@ Examples of how to setup the CMakeLists.txt and .cmake file:
## Bare-metal execution example

See
[simple_embedding for generic platform](https://github.com/google/iree/blob/main/iree/samples/simple_embedding/README.md#generic-platform-support)
[simple_embedding for generic platform](https://github.com/google/iree/blob/main/samples/iree_simple_embedding/README.md#generic-platform-support)
to see how to use the IREE runtime library to build/run the IREE model for the
bare-metal target.
2 changes: 1 addition & 1 deletion docs/website/docs/extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ minimal overhead and is used for example [by the IREE HAL itself](https://github
There is also a C++ wrapper that is significantly easier to work with however it
needs some performance improvements.

A full end-to-end example can be found under [`iree/samples/custom_modules/`](https://github.com/google/iree/tree/main/iree/samples/custom_modules),
A full end-to-end example can be found under [`samples/iree_custom_modules/`](https://github.com/google/iree/tree/main/samples/iree_custom_modules),
though it should not currently be considered representative of best practices.

## 3. Extend target-specific device conversion patterns
Expand Down

0 comments on commit 63fd39f

Please sign in to comment.