[go: nahoru, domu]

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

can't crosscompile tensorflow lite c library using camke #68616

Open
saad-koukous opened this issue May 24, 2024 · 3 comments
Open

can't crosscompile tensorflow lite c library using camke #68616

saad-koukous opened this issue May 24, 2024 · 3 comments
Assignees
Labels
comp:lite TF Lite related issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues type:build/install Build and install issues

Comments

@saad-koukous
Copy link

Issue type

Build/Install

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

2.17.0

Custom code

Yes

OS platform and distribution

Ubuntu 22.04.4 LTS

Mobile device

No response

Python version

No response

Bazel version

cmake version 3.22.1

GCC/compiler version

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

I need to use the tflite c library in a beaglebone black rev3 with this specs:

processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 995.32
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : Generic AM33XX (Flattened Device Tree)
Revision        : 0000
Serial          : 2218SBB15982
ldd (Debian GLIBC 2.28-10) 2.28
gcc version 8.3.0

i'm trying to build the library using this toolchain : gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
so like this tutto https://www.tensorflow.org/lite/guide/build_cmake_arm i used this command first:

mkdir tflite_build
cd tflite_build
ARMCC_FLAGS="-march=armv7-a -mfpu=neon-vfpv3 -funsafe-math-optimizations -mfp16-format=ieee"
ARMCC_PREFIX=${HOME}/toolchains/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc \
  -DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++ \
  -DCMAKE_C_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
  -DCMAKE_SYSTEM_NAME=Linux \
  -DCMAKE_SYSTEM_PROCESSOR=armv7 \
  ../tensorflow/lite/

but then i have errors when i run cmake --build . -j

Standalone code to reproduce the issue

mkdir tflite_build
cd tflite_build
ARMCC_FLAGS="-march=armv7-a -mfpu=neon-vfpv3 -funsafe-math-optimizations -mfp16-format=ieee"
ARMCC_PREFIX=${HOME}/toolchains/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc \
  -DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++ \
  -DCMAKE_C_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}" \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
  -DCMAKE_SYSTEM_NAME=Linux \
  -DCMAKE_SYSTEM_PROCESSOR=armv7 \
  ../tensorflow/lite/
cmake --build . -j

Relevant log output

No response

@google-ml-butler google-ml-butler bot added the type:build/install Build and install issues label May 24, 2024
@saad-koukous
Copy link
Author

And I just test using Ubuntu 16.04.7 LTS and cmake version 3.20.5 but same problem

@sushreebarsa sushreebarsa added comp:lite TF Lite related issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues labels Jun 3, 2024
@sushreebarsa
Copy link
Contributor

@saad-koukous Could you ensure your toolchain includes the necessary libraries and headers for building TensorFlow Lite on ARMv7? Please share the exact error messages or relevant excerpts if possible.
Thank you!

@sushreebarsa sushreebarsa added the stat:awaiting response Status - Awaiting response from author label Jun 3, 2024
@saad-koukous
Copy link
Author
saad-koukous commented Jun 3, 2024

Hi @sushreebarsa, thank you for your response.

I am using the same toolchain presented in this tutorial TensorFlow Lite Guide: Build with CMake for ARM for the ARMv7 case. Attached are the logs from the cmake --build . -j command.
logs.log
erros.txt

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

3 participants