Closed nxbyte closed 6 years ago
NNPACK's migrated to CMake as the primary build system, and MXNet's adaptation to this change it still work-in-progress, see apache/incubator-mxnet#9860 and cc @dabraude and @tqchen.
The error you see arises from not linking cpuinfo library, used in NNPACK to detect ISA features and cache sizes.
@nextseto Alternatively, you may try Caffe2, which integrates the latest NNPACK.
@Maratyszcza Hi, thank you for the explanation.
Until the MXNet team merges the NNPack integration, what previous versions of NNPack and MXNet would still work together?
Probably, but if you want a version that doesn't depend on cpuinfo, you'd have to go to a very old NNPACK revision. f824d521126fea15d01cb1da5cb9dab94602b525 is the last that didn't depend on cpuinfo
It wouldn't work even with an older version of nnpack as there was a rewrite of the operators, I haven't had a lot of time lately to work on it but hopefully next week I can.
Thanks @dabraude! As a stopgap solution, MXNet 0.11 and NNPack 3627062 does still build.
Hello @nextseto, I'm the author of the two posts you mentioned ;)
I ran into the same issue, this is how you can built MXNet 1.1.0 with the latest NNPACK and cpuinfo libs. Using this build, I was able to successfully predict images with a pre-trained version of Inception v3.
1) Build NNPACK as explained
2) Build cpuinfo in a similar fashion git clone https://github.com/Maratyszcza/cpuinfo.git cd cpuinfo configure cpuinfo: confu setup && python ./configure.py add -fPIC to cflags and cxxflags in build.ninja build: ninja
3) Add these to the MXNet makefile (with your own directories, of course): NNPACK = /home/pi/dev/NNPACK CPUINFO = /home/pi/dev/cpuinfo ADD_LDFLAGS = -L$(NNPACK)/lib/ -lnnpack -lpthreadpool -L$(CPUINFO)/lib/ -lcpuinfo ADD_CFLAGS = -I$(NNPACK)/include/ -I$(NNPACK)/deps/pthreadpool/include/
4) Build and install MXNet.
I hope this helps... and I guess I need an updated version of my post!
Cheers to @Maratyszcza for building such great tools.
Thanks soooooo much! @juliensimon I can confirm that it builds successfully. (with a few tweaks) When building with MXNet and NNPack: we had to increase our swap size to 4+ GB because we kept running out of memory when we compiled.
However, like @dabraude mentioned, since the operators were re-written everything causes Segmentation Faults...
So, from a practical stand point, NNPack + MXNet 1.1.0 isn't a viable solution.
Hello! I am attempting to install NNPack on my Raspberry Pi so I can accelerate my machine learning applications with MXNet 1.0. For this installation, I installed a clean version of the latest Raspbian OS (Stretch with Desktop, Kernel 4.9).
However, when I try to build NNPack together with MXNet it fails and I receive this error.
After trying the instructions in the READMEs in this repository, I looked at other instructions found here and here. However, all have led to the same error.
Am I doing something wrong, or does NNPack only support a certain build of MXNet?
Thanks!