- Linux running on x86 compatitable CPUs
- GCC >= 4.9 or LLVM/Clang >= 6.0
- CMake >= 3.11
- Git >= 2.7.0
- CUDA Toolkit >= 10.2 (for CUDA version)
- Python >= 3 (for CUDA version)
git clone https://github.com/openppl-public/ppl.nn.git
./build.sh
Headers and libraries are installed in pplnn-build/install
.
If you want to enable openmp, please specify HPCC_USE_OPENMP
as following:
./build.sh -DHPCC_USE_OPENMP=ON
X86-64 engine is enabled by default.
./build.sh -DHPCC_USE_CUDA=ON
Headers and libraries are installed in pplnn-build/install
.
If you want to use specified CUDA toolkit version, please specify CUDA_TOOLKIT_ROOT_DIR
as following:
./build.sh -DHPCC_USE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=/path/to/cuda-toolkit-root-dir
There is a test tool named pplnn
in tools/pplnn.cc
. You can run pplnn
using the following command:
./pplnn-build/tools/pplnn --onnx-model tests/testdata/conv.onnx
NOTE: if CUDA engine is enabled, pplnn
uses CUDA only.