-
Notifications
You must be signed in to change notification settings - Fork 125
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
Building Edge TPU in an existing build system #691
Comments
Hi, it is version: 2.7.0-dev20211101. I will look at the page. Thanks! |
Hi, I have downloaded the libedgetpu and tensorflow source for includes, however I am getting the following error. I'm not sure if that's quite correct because the instructions say that edgetpu.h should be included but it seems like a lot more was necessary in terms of header files from the tensorflow source error: ‘ops’ in namespace ‘tflite’ does not name a type Dynamically link your code Link to the libedgetpu.so file. You should have installed this library during device setup, but you can also build it yourself. Clone the TensorFlow repo using the TENSORFLOW_COMMIT version specified here—that's the version used to build the libedgetpu.so library, so your TensorFlow version must match. Then build TensorFlow Lite (libtensorflow-lite.a) and also link to that. For example code, checkout classify.cc and the corresponding Makefile. |
I'm also getting the error below. Is there something incorrect in the tensorflow source that I downloaded or do I need to download something additional? Thanks! error: ‘FlatBufferModel’ is not a member of ‘tflite’ |
I've gotten past the namspace errors by including the correct files. /usr/local/lib/libflatc.so: _ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE: invalid version 8 (max 0) |
I have gotten past the flatbuffer link error by installing the flatbuffer properly to have a libflatbuffers.a warning: relocation against undefined reference to `tflite::DefaultErrorReporter()' undefined reference to `tflite::FlatBufferModel::BuildFromFile(char const*, tflite::ErrorReporter*)' undefined reference to `tflite::FlatBufferModel::~FlatBufferModel()' undefined reference to `tflite::InterpreterBuilder::InterpreterBuilder(tflite::FlatBufferModel const&, tflite::OpResolver const&, tflite::InterpreterOptions const*)' (.data.rel.ro._ZTVN6tflite3ops7builtin40BuiltinOpResolverWithoutDefaultDelegatesE[_ZTVN6tflite3ops7builtin40BuiltinOpResolverWithoutDefaultDelegatesE]+0x18): undefined reference to `tflite::MutableOpResolver::FindOp(char const*, int) const' |
I'm getting close I believe with the correct library. Now I am facing an issue which I believe has been seen before but I can't quite figure out what the solution is. Is there some missing library? I tried installing/linking with fftw but this didn't seem to do solve it. Thanks for any pointers on this. I think this is in fftw3? I have tried to link with libfftw3, but it doesn't seem to solve the issue.
|
I found this solution to the 'rdft' undefined reference, but not really sure what the solution entails. Doing an nm on the fftw3 library, it doesn't look like rdft alone is defined, so I'm not sure where this is supposed to come from. Any pointers would be appreciated. I'm wondering if this would be the rdft source (https://packages.altlinux.org/en/p9/srpms/fft2d/)? |
Hi, are you able to build libedgetpu.so with your TF version? |
I'm using tensorflow, tensorflow lite and tpu all in the same build. I'm not sure if the versions are compatible. How would I check the library versions of tensorflow, tensorflow lite and tpu to determine compatibility?
|
You can build the libedgetpu seperately and then link libedgetpu.so with your current build.
|
Thanks for the steps. I have tried to do the libedgetpu make, but am getting the following error. Thanks!
|
Please try with either bazel version 4.0.0 or upgrade your tnesorflow to the latest version. |
I have installed and made with bazel version 4.0.0. It has gotten a lot further, but has encountered this error. Thanks!!
|
Please add |
Thanks, now getting this error. I guess some usb library needs to be installed?
|
Maybe this? Yes, this worked!! |
I am able to build now with tensorflowlite_c lib and using C for TFLite and edge tpu. Thanks!! |
Description
Hi, I have an existing application that I'd like to integrate TPU support with. I already have TF and TFLite support being built through existing libraries not using Bazel. This is running and being built on a Ubuntu PC with an 8 TPU PCIe card. What is the easiest way build this. Ideally, I hope I don't need to build from source but from prebuilt libraries with some minimal header files. Is there a way to do this? Thanks!
The basic code is like this:
Click to expand!
Issue Type
Build/Install
Operating System
Ubuntu
Coral Device
M.2 Accelerator B+M
Other Devices
No response
Programming Language
C++
Relevant Log Output
No response
The text was updated successfully, but these errors were encountered: