|
| 1 | +## ion-kit Linux Install |
| 2 | + |
| 3 | +### 1. Install LLVM |
| 4 | +#### a. Using a binary release (Preferred for all systems) |
| 5 | +Find latest binary release [here](https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.1) for your supported system. |
| 6 | + |
| 7 | +### 2. Install Halide |
| 8 | +#### a. Using a binary release (Preferred for all systems) |
| 9 | +Find latest binary release [here](https://github.com/halide/Halide/releases/tag/v16.0.0) for your supported system. |
| 10 | +```sh |
| 11 | +curl -L https://github.com/halide/Halide/releases/download/v12.0.1/Halide-12.0.1-x86-64-linux-5dabcaa9effca1067f907f6c8ea212f3d2b1d99a.tar.gz | tar zx <path-to-halide-install> |
| 12 | +``` |
| 13 | + |
| 14 | +#### b. Build from source |
| 15 | +##### 2.b.1. Build and install LLVM |
| 16 | +Halide v16.0.1 requires LLVM 16. In the following, assume install LLVM-16.0. |
| 17 | + |
| 18 | +```sh |
| 19 | +git clone https://github.com/llvm/llvm-project.git -b release/16.x --depth=1 |
| 20 | +cd llvm-project |
| 21 | +mkdir build && cd build |
| 22 | +cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<path-to-llvm-install> -DLLVM_ENABLE_PROJECTS="clang;lld;clang-tools-extra" -DLLVM_TARGETS_TO_BUILD="X86;ARM;NVPTX;AArch64;Mips;Hexagon;PowerPC;AMDGPU;RISCV" -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_32_BITS=OFF ../llvm |
| 23 | +cmake --build . --target install |
| 24 | +``` |
| 25 | + |
| 26 | +##### 2.b.2 Build and install Halide |
| 27 | +```sh |
| 28 | +git clone https://github.com/halide/Halide.git -b v16.0.0 --depth=1 |
| 29 | +mkdir build && cd build |
| 30 | +cmake -GNinja -DCMAKE_INSTALL_PREFIX=<path-to-halide-install> -DLLVM_DIR=<path-to-llvm-install>/lib/cmake/llvm/ -DHALIDE_ENABLE_RTTI=ON -DWITH_APPS=OFF .. |
| 31 | +cmake --build . --target install |
| 32 | +``` |
| 33 | + |
| 34 | +### 3. Install onnxruntime (Optional, if you use ion-bb-dnn) |
| 35 | +If you use only cpu, you can get binary release. |
| 36 | +Please visit official onnxruntime [github](https://github.com/microsoft/onnxruntime/releases/tag/v1.16.3) for latest release. |
| 37 | + |
| 38 | +```sh |
| 39 | +curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.4.0/onnxruntime-linux-x64-1.4.0.tgz | tar zx -C <path-to-onnxruntime-install> |
| 40 | +``` |
| 41 | + |
| 42 | +Add directory to `ldconfig` |
| 43 | +``` |
| 44 | +sudo vim /etc/ld.so.conf |
| 45 | +sudo ldconfig |
| 46 | +``` |
| 47 | + |
| 48 | +* Please note, latest version of onnxruntime with GPU only supports `CUDA 1.8` |
| 49 | +* `libcudnn8` will also be needed if you run with GPU, please install with: |
| 50 | +``` |
| 51 | +sudo apt-get install libcudnn8 |
| 52 | +``` |
| 53 | + |
| 54 | +### 4. Place additional building blocks (Appendix) |
| 55 | +If you want to use additional `ion-bb-xx` directories, place them directly under `ion-kit` directory. |
| 56 | + |
| 57 | +### 5. Install OpenCV |
| 58 | +#### a. Using Package Managers |
| 59 | +##### 5.a.1 Linux |
| 60 | +``` |
| 61 | +sudo apt install libopencv-dev |
| 62 | +``` |
| 63 | + |
| 64 | +### 6. Install Generators |
| 65 | +#### a. Using Package Managers |
| 66 | +##### 6.a.1 Linux |
| 67 | +``` |
| 68 | +sudo apt-get install ninja-build |
| 69 | +``` |
| 70 | + |
| 71 | + |
0 commit comments