Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC PATCH 00/10] tensorflow-lite: new package
@ 2022-11-24 14:06 Stefan Hager
  2022-11-24 14:06 ` [Buildroot] [RFC PATCH 01/10] tensorflow-lite-abseil-cpp: " Stefan Hager
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Stefan Hager @ 2022-11-24 14:06 UTC (permalink / raw)
  To: buildroot; +Cc: Stefan Hager, Thomas Petazzoni


[-- Attachment #1.1: Type: text/plain, Size: 6757 bytes --]

Hello,

this RFC patch series proposes a way to integrate the Tensorflow-lite runtime (TFLite) into Buildroot.

This first RFC just integrates the TFLite C++ sahred library. 
After a sucessful first integration the next step wuld be to activate the python library for TFlite. 
As a third step i plan to integrate the NPU Backend Driver for TFLite to use accelerated inference on the i.MX8MP NPU (neural processing unit) for C++ an Python. 
All of this currently works locally as a proof of concept for a few users.

The currently used Version of TFLite is 2.8.0 (official) which is proven to work. 

TFlite comes with a bunch of external source dependencies which are downloaded by separate hidden packages and then built by the main TFLite package. 
TFLite needs its own versions of libabseil, eigen and flatbuffers wich may conflict with the Versions provided by Buildroot. 
Since i can not gurantee that TFlite will work with other Versions of this packages i decided to only let TFlite be activated if this packages are not activated in Buildroot. 

Currently TFlite only supports a limited set of processor architectures (ARMV8A: only 64-bit Support no 32-bit (doesn't build); ARMV7A: only 32-bit Support). 
Anyone else may activate further platforms if needed, but testing needs to then be done by them.

How to build a minimal config with TFLite:
===============================================
$ make raspberrypi4_64_defconfig menuconfig
Activate TFLite in menuconfig: Target packages -> Libraries -> [*] tensorflow-lite
$ make tensorflow-lite

I'm hoping for Comments to prepare a first patchset.

Stefan Hager (10):
  tensorflow-lite-abseil-cpp: new package
  tensorflow-lite-clog: new package
  tensorflow-lite-abseil-cpuinfo: new package
  tensorflow-lite-eigen: new package
  tensorflow-lite-farmhash: new package
  tensorflow-lite-fft2d: new package
  tensorflow-lite-flatbuffers: new package
  tensorflow-lite-gemmlowp: new package
  tensorflow-lite-ruy: new package
  tensorflow-lite: new package

 package/Config.in                             |   1 +
 package/tensorflow-lite-abseil-cpp/Config.in  |   5 +
 .../tensorflow-lite-abseil-cpp.hash           |   3 +
 .../tensorflow-lite-abseil-cpp.mk             |  14 ++
 package/tensorflow-lite-clog/Config.in        |   5 +
 .../tensorflow-lite-clog.hash                 |   3 +
 .../tensorflow-lite-clog.mk                   |  14 ++
 package/tensorflow-lite-cpuinfo/Config.in     |   5 +
 .../tensorflow-lite-cpuinfo.hash              |   3 +
 .../tensorflow-lite-cpuinfo.mk                |  14 ++
 package/tensorflow-lite-eigen/Config.in       |   5 +
 .../tensorflow-lite-eigen.hash                |   9 +
 .../tensorflow-lite-eigen.mk                  |  14 ++
 package/tensorflow-lite-farmhash/Config.in    |   5 +
 .../tensorflow-lite-farmhash.hash             |   3 +
 .../tensorflow-lite-farmhash.mk               |  14 ++
 package/tensorflow-lite-fft2d/Config.in       |   5 +
 .../tensorflow-lite-fft2d.hash                |   3 +
 .../tensorflow-lite-fft2d.mk                  |  15 ++
 package/tensorflow-lite-flatbuffers/Config.in |   5 +
 .../tensorflow-lite-flatbuffers.hash          |   3 +
 .../tensorflow-lite-flatbuffers.mk            |  14 ++
 package/tensorflow-lite-gemmlowp/Config.in    |   5 +
 .../tensorflow-lite-gemmlowp.hash             |   3 +
 .../tensorflow-lite-gemmlowp.mk               |  14 ++
 package/tensorflow-lite-ruy/Config.in         |   5 +
 .../tensorflow-lite-ruy.hash                  |   3 +
 .../tensorflow-lite-ruy.mk                    |  14 ++
 ...2sse-since-this-is-only-useful-on-x8.patch |  34 +++
 ...build-a-shared-library-instead-of-st.patch |  55 +++++
 ...build-tflite-with-external-delegates.patch |  59 +++++
 ...epositories-and-git-pull-configurati.patch | 203 +++++++++++++++
 package/tensorflow-lite/Config.in             |  56 +++++
 package/tensorflow-lite/tensorflow-lite.hash  |   3 +
 package/tensorflow-lite/tensorflow-lite.mk    | 232 ++++++++++++++++++
 35 files changed, 848 insertions(+)
 create mode 100644 package/tensorflow-lite-abseil-cpp/Config.in
 create mode 100644 package/tensorflow-lite-abseil-cpp/tensorflow-lite-abseil-cpp.hash
 create mode 100644 package/tensorflow-lite-abseil-cpp/tensorflow-lite-abseil-cpp.mk
 create mode 100644 package/tensorflow-lite-clog/Config.in
 create mode 100644 package/tensorflow-lite-clog/tensorflow-lite-clog.hash
 create mode 100644 package/tensorflow-lite-clog/tensorflow-lite-clog.mk
 create mode 100644 package/tensorflow-lite-cpuinfo/Config.in
 create mode 100644 package/tensorflow-lite-cpuinfo/tensorflow-lite-cpuinfo.hash
 create mode 100644 package/tensorflow-lite-cpuinfo/tensorflow-lite-cpuinfo.mk
 create mode 100644 package/tensorflow-lite-eigen/Config.in
 create mode 100644 package/tensorflow-lite-eigen/tensorflow-lite-eigen.hash
 create mode 100644 package/tensorflow-lite-eigen/tensorflow-lite-eigen.mk
 create mode 100644 package/tensorflow-lite-farmhash/Config.in
 create mode 100644 package/tensorflow-lite-farmhash/tensorflow-lite-farmhash.hash
 create mode 100644 package/tensorflow-lite-farmhash/tensorflow-lite-farmhash.mk
 create mode 100644 package/tensorflow-lite-fft2d/Config.in
 create mode 100644 package/tensorflow-lite-fft2d/tensorflow-lite-fft2d.hash
 create mode 100644 package/tensorflow-lite-fft2d/tensorflow-lite-fft2d.mk
 create mode 100644 package/tensorflow-lite-flatbuffers/Config.in
 create mode 100644 package/tensorflow-lite-flatbuffers/tensorflow-lite-flatbuffers.hash
 create mode 100644 package/tensorflow-lite-flatbuffers/tensorflow-lite-flatbuffers.mk
 create mode 100644 package/tensorflow-lite-gemmlowp/Config.in
 create mode 100644 package/tensorflow-lite-gemmlowp/tensorflow-lite-gemmlowp.hash
 create mode 100644 package/tensorflow-lite-gemmlowp/tensorflow-lite-gemmlowp.mk
 create mode 100644 package/tensorflow-lite-ruy/Config.in
 create mode 100644 package/tensorflow-lite-ruy/tensorflow-lite-ruy.hash
 create mode 100644 package/tensorflow-lite-ruy/tensorflow-lite-ruy.mk
 create mode 100644 package/tensorflow-lite/0001-Deactivated-neon2sse-since-this-is-only-useful-on-x8.patch
 create mode 100644 package/tensorflow-lite/0002-Added-option-to-build-a-shared-library-instead-of-st.patch
 create mode 100644 package/tensorflow-lite/0003-Added-option-to-build-tflite-with-external-delegates.patch
 create mode 100644 package/tensorflow-lite/0004-Removed-source-repositories-and-git-pull-configurati.patch
 create mode 100644 package/tensorflow-lite/Config.in
 create mode 100644 package/tensorflow-lite/tensorflow-lite.hash
 create mode 100644 package/tensorflow-lite/tensorflow-lite.mk

-- 
2.36.1


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 4625 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-11-30  6:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 14:06 [Buildroot] [RFC PATCH 00/10] tensorflow-lite: new package Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 01/10] tensorflow-lite-abseil-cpp: " Stefan Hager
2022-11-24 14:46   ` Thomas Petazzoni via buildroot
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 02/10] tensorflow-lite-clog: " Stefan Hager
2022-11-24 14:48   ` Thomas Petazzoni via buildroot
2022-11-25 16:21     ` James Hilliard
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 03/10] tensorflow-lite-abseil-cpuinfo: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 04/10] tensorflow-lite-eigen: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 05/10] tensorflow-lite-farmhash: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 06/10] tensorflow-lite-fft2d: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 07/10] tensorflow-lite-flatbuffers: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 08/10] tensorflow-lite-gemmlowp: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 09/10] tensorflow-lite-ruy: " Stefan Hager
2022-11-24 14:06 ` [Buildroot] [RFC PATCH 10/10] tensorflow-lite: " Stefan Hager
2022-11-24 14:54 ` [Buildroot] [RFC PATCH 00/10] " James Hilliard
     [not found]   ` <AM5PR06MB315361D4448EE9C17B1C3F65840E9@AM5PR06MB3153.eurprd06.prod.outlook.com>
2022-11-25 16:16     ` James Hilliard
2022-11-28 15:17       ` Hager Stefan
2022-11-28 18:02         ` James Hilliard
2022-11-30  6:43           ` Hager Stefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox