Skip to content

Latest commit

 

History

History
73 lines (64 loc) · 1.36 KB

build.md

File metadata and controls

73 lines (64 loc) · 1.36 KB

Build from source

从源码编译

Linux

  1. Install dependencies
  • gcc >= 8
  • cmake >=3.8
  • python >= 3.6
  1. Install conan
pip install conan==1.21.1
  1. Clone source
git clone https://github.com/kendryte/nncase.git --recursive
  1. Build
mkdir out && cd out
cmake .. -DNNCASE_TARGET=k210 -DCMAKE_BUILD_TYPE=Release
make -j
  1. Test (optional)

Install dependencies (MacOS)

pip install six==1.12 conan==1.19.2 tensorflow==2.0.0 matplotlib pillow pytest onnxruntime torch torchvision

Install dependencies

pip install six==1.12 conan==1.19.2 tensorflow==2.0.0 matplotlib pillow pytest onnxruntime
pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

Run tests

pytest tests

Windows

  1. Install dependencies
  • Visual Studio 2019
  • cmake >=3.8
  • python >= 3.6
  1. Install conan
pip install conan==1.21.1
  1. Clone source
git clone https://github.com/kendryte/nncase.git --recursive
  1. Build

Open Developer Command Prompt for VS 2019

md out && cd out
cmake .. -G "Visual Studio 16 2019" -A x64 -DNNCASE_TARGET=k210 -DCMAKE_BUILD_TYPE=Release
msbuild nncase.sln
  1. Test (optional)

Install dependencies

pip install six==1.12 conan==1.19.2 tensorflow==2.0.0 matplotlib pillow pytest

Run tests

pytest tests