diff --git a/docs/developers/best_practices.md b/docs/developers/best_practices.md index 8745b8af5db6..62a787cf6bfc 100644 --- a/docs/developers/best_practices.md +++ b/docs/developers/best_practices.md @@ -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 @@ -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 diff --git a/docs/developers/developing_iree/benchmarking.md b/docs/developers/developing_iree/benchmarking.md index 49c86528c7e2..2a9a8dcea575 100644 --- a/docs/developers/developing_iree/benchmarking.md +++ b/docs/developers/developing_iree/benchmarking.md @@ -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 ``` diff --git a/docs/developers/developing_iree/developer_overview.md b/docs/developers/developing_iree/developer_overview.md index 439b3f5cb0fa..0866fb87c6df 100644 --- a/docs/developers/developing_iree/developer_overview.md +++ b/docs/developers/developing_iree/developer_overview.md @@ -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 @@ -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 ``` @@ -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 @@ -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 ``` diff --git a/docs/developers/get_started/building_with_bazel_linux.md b/docs/developers/get_started/building_with_bazel_linux.md index f31feb9df64a..8239a0518d80 100644 --- a/docs/developers/get_started/building_with_bazel_linux.md +++ b/docs/developers/get_started/building_with_bazel_linux.md @@ -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 ``` diff --git a/docs/developers/get_started/building_with_bazel_macos.md b/docs/developers/get_started/building_with_bazel_macos.md index bfbff4a8569f..c37efd4d2176 100644 --- a/docs/developers/get_started/building_with_bazel_macos.md +++ b/docs/developers/get_started/building_with_bazel_macos.md @@ -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 ``` diff --git a/docs/developers/get_started/building_with_bazel_windows.md b/docs/developers/get_started/building_with_bazel_windows.md index 9486ae6ae690..174785d34d30 100644 --- a/docs/developers/get_started/building_with_bazel_windows.md +++ b/docs/developers/get_started/building_with_bazel_windows.md @@ -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 diff --git a/docs/website/docs/bindings/c-api.md b/docs/website/docs/bindings/c-api.md index 174097d81147..e140b22aad41 100644 --- a/docs/website/docs/bindings/c-api.md +++ b/docs/website/docs/bindings/c-api.md @@ -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 diff --git a/docs/website/docs/building-from-source/android.md b/docs/website/docs/building-from-source/android.md index 7b051d7ed478..9aceb57bbf31 100644 --- a/docs/website/docs/building-from-source/android.md +++ b/docs/website/docs/building-from-source/android.md @@ -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 ``` diff --git a/docs/website/docs/building-from-source/riscv.md b/docs/website/docs/building-from-source/riscv.md index 27ff4c0b6a97..6bfba86dfac8 100644 --- a/docs/website/docs/building-from-source/riscv.md +++ b/docs/website/docs/building-from-source/riscv.md @@ -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 @@ -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 ``` diff --git a/docs/website/docs/deployment-configurations/bare-metal.md b/docs/website/docs/deployment-configurations/bare-metal.md index 0c65b597af76..b4dc8487d966 100644 --- a/docs/website/docs/deployment-configurations/bare-metal.md +++ b/docs/website/docs/deployment-configurations/bare-metal.md @@ -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 ``` @@ -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`. @@ -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 @@ -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. diff --git a/docs/website/docs/extensions/index.md b/docs/website/docs/extensions/index.md index cd26866a8104..6992cc348e63 100644 --- a/docs/website/docs/extensions/index.md +++ b/docs/website/docs/extensions/index.md @@ -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