google-coral / libedgetpu

Source code for the userspace level runtime driver for Coral.ai devices.
Apache License 2.0
179 stars 60 forks source link

Add support for TF 2.16.1 #63

Closed feranick closed 5 months ago

feranick commented 5 months ago

This PR builds libedgetpu against TF 2.16.1.

feranick commented 5 months ago

@Namburger I know this doesn't have the visibility patch, yet, libedgetpu can be used independently from libcoral and pycoral, so providing support for TF 2.16.1 now can be beneficial to the user as it introduces keras 3.

Namburger commented 5 months ago

@Namburger I know this doesn't have the visibility patch, yet, libedgetpu can be used independently from libcoral and pycoral, so providing support for TF 2.16.1 now can be beneficial to the user as it introduces keras 3.

yeah, that sounds fine to me, as the current state of libedgetpu @ tf2.15 is already not building for libcoral and pycoral

feranick commented 5 months ago

BTW, @Namburger is there any plan to provide actual binaries? while pycoral is distributed as a wheel (and so via Pypi, at least in principle), libedge is (according to the documentation anyway) distributed through either a debian repo, or a link for Windows or MacOS. Doesn't really affect me, but certainly those reading the documentation will expect to find updated binaries there, regardless on this github repo. Thanks.

Namburger commented 5 months ago

@feranick I don't have the infra to host libedgetpu packages to be installed via apt like previously, unfortunately. I think something we could do is to have a github CI package it on new commits to master and have them hosted on github? I'll need to figure out what to do about the documentations..

feranick commented 5 months ago

@Namburger I think using Github releases is a good strategy. In fact that is how MacOS/Windows binaries are currently served. In principle, changing the binaries in the zip files is all that would be requires (besides, changing the documentation accordingly). As for LInux packages, I have been making all sorts of deb packages that I hosted in my libedgetpu forked repo (even for the current release against TF 2.15), which you may be able to port directly into a new release for the official repo.

https://github.com/feranick/libedgetpu/releases/tag/16.0TF2.16.1-1 https://github.com/feranick/libedgetpu/releases/tag/v16.0-TF2.15.0-1

I have x86_64 binaries for MacOS (I don't have M* macs) and I don't use Windows, so don't have binaries for those, but shouldn't be hard to make them. In any case, github may be indeed the easiest way to go, assuming the online documentation can be modified.

feranick commented 5 months ago

(An irrelevant note of appreciation of what the edgetpu can still do despite its age. While being launched in 2019, with a rated 4 TOPS, it still perform quite well compared with highly hyped Desktop rated NPUs from Intel/AMD, supposedly reaching 10 TOPS. Google did something truly special, if not a bit underrated).

Namburger commented 5 months ago

(An irrelevant note of appreciation of what the edgetpu can still do despite its age. While being launched in 2019, with a rated 4 TOPS, it still perform quite well compared with highly hyped Desktop rated NPUs from Intel/AMD, supposedly reaching 10 TOPS. Google did something truly special, if not a bit underrated).

yeah, I'm just as bump out about the state that the project is in :/

TheFoundingMao commented 4 months ago

This PR builds libedgetpu against TF 2.16.1.

https://github.com/google-coral/edgetpu/issues/841 New to this website could you help me out here?

stakach commented 3 months ago

This pull fails to maintain the makefile builds seeing

make: *** No rule to make target './tensorflow/tensorflow/lite/c/common.c', needed by './libedgetpu/makefile_build/../out/./tensorflow/tensorflow/lite/c/common.o'.  Stop.
make: *** Waiting for unfinished jobs....

tensorflow/lite/c/common.c no longer exists, there is a tensorflow/lite/c/common.h though

feranick commented 3 months ago

This has worked for me quite well. Please provide full log and the system you are compiling for.

stakach commented 3 months ago

I am running:

git clone --depth 1 --branch "v2.16.1" https://github.com/tensorflow/tensorflow
git clone https://github.com/google-coral/libedgetpu
cd libedgetpu
export TFROOT=~/tensorflow
make -f makefile_build/Makefile -j$(nproc) libedgetpu

seeing output:

make: *** No rule to make target '/home/steve/projects/tensorflow/tensorflow/lite/c/common.c', needed by '/home/steve/projects/libedgetpu/makefile_build/../out//home/steve/projects/tensorflow/tensorflow/lite/c/common.o'.  Stop.
make: *** Waiting for unfinished jobs....

@feranick probably somewhat related to https://github.com/google-coral/libedgetpu/pull/66 the build gets further if I include those changes but still fails

feranick commented 3 months ago

I can reproduce. I will take a look. In the meantime, the building with Docker/Bazel is recommended, as it works properly (see the README.md).

(#66 is outdated and most already merged).

feranick commented 3 months ago

Apologizes, You are actually correct. The PR in #66 should be applied. However, it still doesn't compile for me. See comment in #66.

feranick commented 1 month ago

I just pushed a new PR that adds support for TF 2.17.0, and allows for compilation of libcoral and 'pycoral`.