Skip to content

Commit 05b7606

Browse files
authored
Merge pull request #180 from fixstars/feature/update-readme
Update Readme
2 parents 188ee14 + fa9c35f commit 05b7606

File tree

5 files changed

+181
-43
lines changed

5 files changed

+181
-43
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/build*
22
__pycache__
3-
.DS_Store
43
.vscode

INSTALL-LINUX.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+

INSTALL-MACOS.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## ion-kit MacOS 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+
#### b. Install with Package Managers
7+
##### 1.b.1. Install with Brew (MacOS)
8+
```
9+
brew install llvm@16
10+
```
11+
12+
### 2. Install Halide
13+
#### a. Using a binary release (Preferred for all systems)
14+
Find latest binary release [here](https://github.com/halide/Halide/releases/tag/v16.0.0) for your supported system.
15+
```sh
16+
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>
17+
```
18+
#### b. Install with Package Managers
19+
##### 2.b.1. Install with Brew (MacOS)
20+
```
21+
brew install Halide@16
22+
```
23+
Use `brew info` to install and check missing dependencies (including `llvm16`)
24+
25+
#### c. Build from source
26+
##### 2.c.1. Build and install LLVM
27+
Halide v16.0.1 requires LLVM 16. In the following, assume install LLVM-16.0.
28+
29+
```sh
30+
git clone https://github.com/llvm/llvm-project.git -b release/16.x --depth=1
31+
cd llvm-project
32+
mkdir build && cd build
33+
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
34+
cmake --build . --target install
35+
```
36+
37+
##### 2.c.2 Build and install Halide
38+
```sh
39+
git clone https://github.com/halide/Halide.git -b v16.0.0 --depth=1
40+
mkdir build && cd build
41+
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 ..
42+
cmake --build . --target install
43+
```
44+
45+
### 3. Install onnxruntime (Optional, if you use ion-bb-dnn)
46+
**Not currently supported on MacOS.**
47+
48+
### 4. Place additional building blocks (Appendix)
49+
If you want to use additional `ion-bb-xx` directories, place them directly under `ion-kit` directory.
50+
51+
### 5. Install OpenCV
52+
#### a. Using Package Managers
53+
##### 5.a.1 MacOS
54+
```
55+
brew install opencv
56+
```
57+
58+
### 6. Install Generators
59+
#### a. Using Package Managers
60+
##### 6.a.1 MacOS
61+
```
62+
brew install ninja
63+
```

INSTALL-WINDOWS.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## ion-kit Windows 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+
11+
### 3. Install onnxruntime (Optional, if you use ion-bb-dnn)
12+
WIP
13+
14+
### 4. Place additional building blocks (Appendix)
15+
If you want to use additional `ion-bb-xx` directories, place them directly under ` `ion-kit` directory.
16+
17+
### 5. Install OpenCV
18+
#### a. Using Installers
19+
##### 5.a.1 Windows
20+
Download and install latest from [OpenCV](https://sourceforge.net/projects/opencvlibrary/files/)
21+
22+
### 6. Install Generators
23+
Please install the latest version of Microsoft Visual Studio.

README.md

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,44 @@
11
# ion-kit
2-
A framework to compile user-defined pipeline.
2+
A framework to compile user-defined pipeline. Current support:
3+
* Linux
4+
* Windows
5+
* MacOS
36

47
## Depedencies
5-
* [Halide (v12.0.1)](https://github.com/halide/Halide/releases/tag/v12.0.1)
8+
* [Halide (v16.0.0)](https://github.com/halide/Halide/releases/tag/v16.0.0)
9+
* llvm
610
* doxygen
711
* sphinx
12+
* ninja (unix)
13+
* msvc (windows)
814

9-
## Build
10-
### 1. Install Halide
11-
#### a. Using a binary release
12-
```sh
13-
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>
14-
```
15-
16-
#### b. Build from source
17-
##### 2.b.1. Build and install LLVM
18-
Halide v12.0.1 requires LLVM 11.0-12.0. In the following, assume install LLVM-12.0.
15+
### 1. Install
16+
Please follow the instructions provided for your preferred platform.
17+
* [Linux](INSTALL-LINUX.md)
18+
* [Windows](INSTALL-WINDOWS.md)
19+
* [MacOS](INSTALL-MACOS.md)
1920

21+
### 2. Build
22+
#### a. Unix
2023
```sh
21-
git clone https://github.com/llvm/llvm-project.git -b release/12.x --depth=1
22-
cd llvm-project
2324
mkdir build && cd build
24-
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
25-
cmake --build . --target install
25+
cmake -GNinja -DCMAKE_INSTALL_PREFIX=<path-to-ion-kit-install> -DHalide_DIR=<path-to-HalideConfig.cmake> -DONNXRUNTIME_ROOT=<path-to-onnxruntime-root> -DOPENCV_DIR=<path-to-opencv-cmake> ../
26+
cmake --build .
2627
```
27-
28-
##### 2.b.2 Build and install Halide
29-
```sh
30-
git clone https://github.com/halide/Halide.git -b v12.0.1 --depth=1
31-
mkdir build && cd build
32-
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 ..
33-
cmake --build . --target install
28+
#### b. Windows
3429
```
35-
36-
### 2. Install onnxruntime (Optional, if you use ion-bb-dnn)
37-
If you use only cpu, you can get binary release.
38-
39-
```sh
40-
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>
41-
```
42-
43-
### 3. Place additional building blocks (Appendix)
44-
If you want to use additional `ion-bb-xx` directories, place them directly under ` `ion-kit` directory.
45-
46-
47-
### 4. Build
48-
```sh
49-
mkdir build && cd build
50-
cmake -GNinja -DCMAKE_INSTALL_PREFIX=<path-to-ion-kit-install> -DHalide_DIR=<path-to-HalideConfig.cmake> -DONNXRUNTIME_ROOT=<path-to-onnxruntime-root> ../
51-
cmake --build .
30+
mkdir build
31+
cd build
32+
cmake -G "Visual Studio 17 2022" -A x64 -DHalide_DIR=<path-to-HalideConfig.cmake> -DOpenCV_DIR=<path-to-opencv-cmake> ../
33+
cmake --build . --config Release
5234
```
5335

54-
### 5. Install
36+
### 3. Install
5537
```sh
5638
cmake --build . --target install
5739
```
5840

59-
### 6. Run examples
41+
### 4. Run examples
6042
```sh
6143
ctest
6244
```

0 commit comments

Comments
 (0)