Update GettingStarted with toolchain and IREE information Change-Id: I29f13cb1964f6b02afbe9bcf2dc8cdcbb255f05a
diff --git a/GettingStarted.md b/GettingStarted.md index f239a0e..972c556 100644 --- a/GettingStarted.md +++ b/GettingStarted.md
@@ -61,7 +61,7 @@ Install the RISCV toolchain: ``` -m toolchain +m tools ``` Install the instruction set simulator: @@ -153,6 +153,11 @@ Contains tools and src for simulation of the shodan hw. +#### toolchain/ + +Contains the src to build the RISCV GCC/LLVM/QEMU toolchain, and +[IREE](https://github/com/google/iree) toolchain for ML models. + ## Start a simulation The simulator used for Shodan is [Renode](https://renode.io/). @@ -173,6 +178,45 @@ start ``` +## Build and test ML artifacts + +The ML executable is built with [IREE](https://github.com/google/iree) workflow. +The flow for RISCV 32-bit is still WIP, so you need to build the toolchain outside of the `m tools` +in the previous section. Eventually it will become part of the default toolchain. + +The following instructions are the based on the +[getting started doc](https://google.github.io/iree/get-started/getting-started-riscv-cmake) +on IREE webpage but the GCC/LLVM toolchain are built from the source code. + +To build the IREE RISCV prerequisite toolchains: +``` +m toolchain_llvm +m qemu +``` + +To build the IREE targets: +``` +m iree +``` + +To run the toy example (abs(-10)) for testing: +``` +bash scripts/run-iree.sh +``` + +The output should be shown as: +``` +I .../iree/tools/utils/vm_util.cc:258] Creating driver and device for 'dylib'... +Error in cpuinfo: processor architecture is not supported in cpuinfo +Error in cpuinfo: processor architecture is not supported in cpuinfo +EXEC @abs +I .../iree/tools/utils/vm_util.cc:201] result[0]: Buffer<sint32[]> +EXEC @abs i32=10 +Smoke test passed + +``` +The test is also checked at the end of `m iree` + ## More Information - [Information on how to use repo](https://go/repo)