Giter VIP home page Giter VIP logo

ion-kit's Introduction

ion-kit

A framework to compile user-defined pipeline.

Depedencies

Build

1. Install Halide

a. Using a binary release

curl -L https://github.com/halide/Halide/releases/download/v8.0.0/halide-linux-64-gcc53-800-65c26cba6a3eca2d08a0bccf113ca28746012cc3.tgz | tar zx <path-to-halide-install>

b. Build from source

2.b.1. Build and install LLVM

Halide release_2019_08_27 requires LLVM 7.0-9.0. In the following, assume install LLVM-9.0.

git clone https://github.com/llvm/llvm-project.git -b release/9.x --depth=1
cd llvm-project
mkdir build && cd build
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
cmake --build . --target install
2.b.2 Build and install Halide
git clone https://github.com/halide/Halide.git -b release_2019_08_27 --depth=1
mkdir build && cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=<path-to-halide-install> -DLLVM_DIR=<path-to-llvm-install>/lib/cmake/llvm/ -DLLVM_PACKAGE_VERSION=90 -DHALIDE_ENABLE_RTTI=ON -DWITH_APPS=OFF ..
cmake --build . --target install

2. Install onnxruntime (Optional, if you use ion-bb-dnn)

If you use only cpu, you can get binary release.

curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.4.0/onnxruntime-linux-x64-1.4.0.tgz | tar zx <path-to-onnxruntime-install>

5. Place additional building blocks (Appendix)

If you want to use additional ion-bb-xx directories, place them directly under ion-kit` directory.

4. Build

mkdir build && cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=<path-to-ion-kit-install> -DHALIDE_ROOT=<path-to-halide-install> -DONNXRUNTIME_ROOT=<path-to-onnxruntime-root> ../
cmake --build .

5. Install

cmake --build . --target install

6. Run examples

ctest

CMake variables

Variable Type Descriotion
HALIDE_ROOT Path Path to Halide install directory.
ION_CORE_ROOT Path Path to ion-core source root directory (Optional. if you don't set, it is cloned from remote repository.)
ION_TARGET_BB_ALL ON/OFF Enable to buld all building blocks. (Default: ON)
ION_TARGET_BBS String The building blocks of target to build. (This overrides ION_BUILD_ALL_BB)
BUILD_EXAMPLE ON/OFF Enable to bulid examples. (Default: ON)
WITH_CUDA ON/OFF Enable CUDA with buliding examples. (Default: ON)

ion-kit's People

Contributors

fixstars-iizuka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.