jetpacapp / DeepBeliefSDK

The SDK for Jetpac's iOS Deep Belief image recognition framework
Other
2.86k stars 437 forks source link

Raspberry PI B 2 locks up #36

Open pageauc opened 9 years ago

pageauc commented 9 years ago

I have successfully installed and run the SDK on one of my RPI B+ with no problems. Memory set to 128. Tried the same install procedure several times on a new RPI B 2 quadcore. The machine consistently locks up when trying to run the example/SimpleLinux sudo ./deepbelief test. RPI then needs a hard reboot to get working again. Not sure if this is an issue with RPI B 2 but would like to see if anyone else has a similar problem. Thanks

danielchalef commented 9 years ago

My guess is that we need to recompile from source given the different ARM architecture. I've tried this, and unfortunately qpu_gemm did not compile:

g++ -Ofast -I ./src/lib/include -I ./src/lib/graph -I ./src/lib/math -I ./src/lib/third_party -I ./src/lib/utility -I ./src/lib/svm -I ./src/lib/opengl -I ./src/lib -I ./src/include -fPIC -c src/lib/pi/qpu_gemm.cpp -o src/lib/pi/qpu_gemm.o
src/lib/pi/qpu_gemm.cpp: In function 'void test_qpu_gemm()':
src/lib/pi/qpu_gemm.cpp:353:16: error: 'class Buffer' has no member named '_gpuMemoryBase'
src/lib/pi/qpu_gemm.cpp:355:14: error: 'class Buffer' has no member named '_gpuMemoryBase'
src/lib/pi/qpu_gemm.cpp:358:18: error: 'class Buffer' has no member named '_gpuMemoryBase'
src/lib/pi/qpu_gemm.cpp:432:21: error: 'class Buffer' has no member named '_gpuMemoryBase'
src/lib/pi/qpu_gemm.cpp:437:14: error: 'class Buffer' has no member named '_gpuMemoryBase'
src/lib/pi/qpu_gemm.cpp:440:18: error: 'class Buffer' has no member named '_gpuMemoryBase'
Makefile:91: recipe for target 'src/lib/pi/qpu_gemm.o' failed
make: *** [src/lib/pi/qpu_gemm.o] Error 1
petewarden commented 9 years ago

From looking at the errors, it looks like the right defines aren't set up to get that member in buffer. Did you use the same make command line that's mentioned here? http://petewarden.com/2014/08/07/how-to-optimize-raspberry-pi-code-using-its-gpu/ make TARGET=pi GEMM=piqpu

danielchalef commented 9 years ago

Compiling the assembler and using the correct make target worked. However, running the test below locked up the RPi 2.

 sudo ./jpcnn -i data/dog.jpg -n ../networks/jetpac.ntwk -t -m s

I confirmed that the libjpcnn.so that I had compiled was indeed the file I had symlinked to /usr/lib:

lrwxrwxrwx 1 root root 50 Mar 11 03:06 /usr/lib/libjpcnn.so -> /home/pi/projects/DeepBeliefSDK/source/libjpcnn.so
petewarden commented 9 years ago

Thanks Daniel. It sounds like you're hitting the same problem as Claude now. I've just ordered a Pi 2, hopefully I can debug what's going wrong soon.

danielchalef commented 9 years ago

Great. Have fun with your new Pi 2!