commit | 39d45a1c4ab68cc0ab21f55d5d8b470178c54468 | [log] [tgz] |
---|---|---|
author | Yun Hsiang <hsiang023167@gmail.com> | Thu Jun 22 00:03:01 2023 +0800 |
committer | GitHub <noreply@github.com> | Wed Jun 21 09:03:01 2023 -0700 |
tree | c5c53b61ba17e7dfe5415637057b6f3870610bbb | |
parent | cd0d1f11713e48c2b17945520602e7ea9f6498c9 [diff] |
Add riscv64 baremetal runtime (#14105) This patch add a build rule for riscv64 baremetal runtime. The riscv64 baremetal toolchain can get from https://github.com/riscv-collab/riscv-gnu-toolchain. riscv64 baremetal toolchain build command: ``` git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git cd riscv-gnu-toolchain mkdir -p build/install && cd build ../configure --enable-llvm --prefix=`realpath install` make -j8 ``` Build command ``` cmake -G Ninja \ -B ../iree-baremetal-rv64 \ -DCMAKE_TOOLCHAIN_FILE="./build_tools/cmake/riscv.toolchain.cmake" \ -DRISCV_TOOLCHAIN_ROOT=<riscv64 baremetal toolchain root> \ -DRISCV_CPU="generic-riscv_64" \ -DRISCV_TOOLCHAIN_PREFIX="riscv64-unknown-elf-" \ -DIREE_HOST_BIN_DIR=<host tool bin path> \ -DRISCV_COMPILER_FLAGS="-O2" \ -DIREE_BUILD_COMPILER=OFF \ -DIREE_ENABLE_CPUINFO=OFF \ -DIREE_BUILD_TESTS=OFF \ -DIREE_ENABLE_ASSERTIONS=ON \ -DIREE_BUILD_SAMPLES=ON \ . cmake --build ../iree-baremetal-rv64 ``` Test Command ``` qemu-riscv64 -cpu rv64 -B 0x100000 ../iree-baremetal-rv64-gnu/samples/simple_embedding/simple_embedding_embedded_sync ```
IREE (Intermediate Representation Execution Environment, pronounced as “eerie”) is an MLIR-based end-to-end compiler and runtime that lowers Machine Learning (ML) models to a unified IR that scales up to meet the needs of the datacenter and down to satisfy the constraints and special considerations of mobile and edge deployments.
See our website for project details, user guides, and instructions on building from source.
IREE is still in its early phase. We have settled down on the overarching infrastructure and are actively improving various software components as well as project logistics. It is still quite far from ready for everyday use and is made available without any support at the moment. With that said, we welcome any kind of feedback on any communication channels!
See our website for more information.
IREE is licensed under the terms of the Apache 2.0 License with LLVM Exceptions. See LICENSE for more information.