https://github.com/szagoruyko/nnpack.torch
Torch FFI-bindings for NNPACK
https://github.com/szagoruyko/nnpack.torch
Last synced: 5 months ago
JSON representation
Torch FFI-bindings for NNPACK
- Host: GitHub
- URL: https://github.com/szagoruyko/nnpack.torch
- Owner: szagoruyko
- Created: 2016-04-28T00:17:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-26T01:15:35.000Z (almost 8 years ago)
- Last Synced: 2025-01-01T18:35:04.932Z (5 months ago)
- Language: Lua
- Homepage:
- Size: 15.6 KB
- Stars: 30
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Torch FFI-bindings for NNPACK
=============NNPACK is a fast CPU implementation of convolution operations for training ConvNets:
https://github.com/Maratyszcza/NNPACKThe bindings are fully working and tested against `nn` version. Only single precision supported.
Make sure you have AVX2 compatible Skylake/Broadwell/Haswell CPU.Limitations of NNPACK:
* there is no scale parameter on `accGradParameters` call
# Installation
Follow installation steps at https://github.com/Maratyszcza/NNPACK to generate `libnnpack.so` and place where `LD_LIBRARY_PATH` can find it.
Then do
```
luarocks install https://raw.githubusercontent.com/szagoruyko/nnpack.torch/master/nnpack-scm-1.rockspec
```# Conversion between nnpack and nn
Similar to `cudnn.convert` in [cudnn.torch](https://github.com/soumith/cudnn.torch) easy backend switching is supported. To switch to `nnpack` just do:
```lua
nnpack.convert(net, nnpack)
```There will be no memory copy, just metatables will be swapped.
# Credits
Thanks to @Maratyszcza for adding the option to generate shared NNPACK library.