This package is not officially maintained. It has been merged in NNlib.jl which offers deep learning primitives for a variety of backends. The source code for NNPACK.jl is now maintained here so please redirect any issue and pull requests to NNlib.jl.
This is a wrapper for the low level deep learning acceleration package for multicore CPUs NNPACK.
NNPACK can be directly used with NNlib without any dependency on this package. The NNPACK wrapper resides inside the NNlib package. For integration with other deep learning libraries this wrapper may be used.
This package works on julia 1.0. So to install it simply do
] add https://github.com/avik-pal/NNPACK.jl
This will work only on Linux. Follow the Installation for OSX
to get it working on OSX
conv
∇conv_data
∇conv_filter
softmax
maxpool
To know more in detail about this functions refer to the src/interface.jl
file. If you are familiar with the NNlib APIs then its pretty simple to understand this.
There are other NNPACK functions available but their API is not exposed. For using them refer to
the src/libnnpack.jl
file.
NNPACK_CPU_THREADS
: Controls the number of threads NNPACK is allowed to use. Defaults to4
.NNPACK_FAST_OPS
: Enables operations onFloat64
Arrays. However, you might loose precision and the final output will also be inFloat32
. Defaults to1
.
# Install PeachPy
$ git clone https://github.com/Maratyszcza/PeachPy.git
$ cd PeachPy
$ sudo pip install --upgrade -r requirements.txt
$ python setup.py generate
$ sudo pip install --upgrade .
# Install Ninja Build System
$ sudo apt-get install ninja-build
$ pip install ninja-syntax
# Build NNPack shared library
$ cd ~
$ git clone --recursive https://github.com/Maratyszcza/NNPACK.git
$ cd NNPACK
$ python ./configure.py
$ cmake . -G Ninja -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DNNPACK_LIBRARY_TYPE="shared"
After this copy the libnnpack.so
to ~/.julia/packages/NNPACK/deps/usr/lib/libnnpack.so
.
- Windows is not supported by NNPACK. There is unofficial support for windows in nnpack-windows but the API is a bit different.
- OSX build will fail.
- Travis tests fail due to Unsupported Hardware error.