Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on Raspberry Pi CM3+ #4

Open
Valdiolus opened this issue Sep 20, 2021 · 1 comment
Open

Doesn't work on Raspberry Pi CM3+ #4

Valdiolus opened this issue Sep 20, 2021 · 1 comment

Comments

@Valdiolus
Copy link

Hi! I am working with the custom board with CM3+ and edgetpu.
During compilation of "edgetpu-minimal-example" master all is ok, I see all compiled libraries.
But after I can't compile my code with edgetpu libraries (on C). It fails with the followong error:

/usr/bin/ld: /home/pi/edgetpu-minimal-example/build/tensorflow/src/tf/tensorflow/lite/tools/make/gen/rpi_armv7l/lib/libtensorflow-lite.a(densify.o): in function tflite::ops::builtin::densify::Eval(TfLiteContext*, TfLiteNode*)': densify.cc:(.text+0x388): undefined reference to tflite::optimize::sparsity::FormatConverter::FormatConverter(std::vector<int, std::allocator > const&, TfLiteSparsity const&)'
/usr/bin/ld: densify.cc:(.text+0x394): undefined reference to tflite::optimize::sparsity::FormatConverter<signed char>::SparseToDense(signed char const*)' /usr/bin/ld: densify.cc:(.text+0x730): undefined reference to tflite::optimize::sparsity::FormatConverter::FormatConverter(std::vector<int, std::allocator > const&, TfLiteSparsity const&)'
/usr/bin/ld: densify.cc:(.text+0x73c): undefined reference to tflite::optimize::sparsity::FormatConverter<float>::SparseToDense(float const*)' /usr/bin/ld: /home/pi/edgetpu-minimal-example/build/tensorflow/src/tf/tensorflow/lite/tools/make/gen/rpi_armv7l/lib/libtensorflow-lite.a(spectrogram.o): in function tflite::internal::Spectrogram::ProcessCoreFFT()':
spectrogram.cc:(.text+0xc0): undefined reference to `rdft'
collect2: error: ld returned 1 exit status
make: *** [Makefile:32: rwc_main] Error 1

I also tried to launch "minimal" with *_edgetpu.tflite - ended with the following error:

ERROR: Encountered unresolved custom op: edgetpu-custom-op.
ERROR: Node number 0 (edgetpu-custom-op) failed to prepare.

Failed to allocate tensors.
Segmentation fault

I checked the same with Raspberry pi 4 - all works fine.
What could be the issue?
Also, python edgetpu code works on RPI3+, but I need C libraries running.
Thanks!

@Valdiolus
Copy link
Author

Valdiolus commented Nov 21, 2021

After a 1 full week of work I found the way to install it on the RPI CM3+.
You don't need to install Bazel (I tried - doesn't work well) or some weird tf commit.
Just zip compiled /edgetpu-minimal-example from RPI4 and unzip it in the same place (in home) on the RPI3.

Next - you need libedgetpu1-max_14.1_armhf.deb (because 16 version doesn't work) - I found this version in cache on RPI4))))))
dpkg -i libedgetpu1-max_14.1_armhf.deb

That's all!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant