-
Notifications
You must be signed in to change notification settings - Fork 21
python3-tensorflow-lite, libtensorflow-lite[-c]: Set TENSORFLOW_TARGET_ARCH for every target arch #121
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
Merged
NobuoTsukamoto
merged 6 commits into
NobuoTsukamoto:walnascar
from
zboszor:fix-x86-build
Jul 21, 2025
Merged
python3-tensorflow-lite, libtensorflow-lite[-c]: Set TENSORFLOW_TARGET_ARCH for every target arch #121
NobuoTsukamoto
merged 6 commits into
NobuoTsukamoto:walnascar
from
zboszor:fix-x86-build
Jul 21, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
FWIW, this also fixes the build of |
Owner
|
Thank you very much for adding the target.
|
Contributor
Author
Added. |
…T_ARCH for every target arch
Set TENSORFLOW_TARGET_ARCH for every target arch from ${TARGET_ARCH}.
This fixes the configure warning when building for x86_64:
CMake Warning at .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/CMakeLists.txt:93 (MESSAGE):
Target processor architecture is not specified. cpuinfo will compile, but
cpuinfo_initialize() will always fail.
and the subsequent build error:
In file included from .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/cpuinfo/internal-api.h:11,
from .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/api.c:5:
.../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/api.c: In function 'cpuinfo_get_current_processor':
.../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/api.c:318:30: error: implicit declaration of function 'syscall' [-Wimplicit-function-declaration]
318 | if CPUINFO_UNLIKELY (syscall(__NR_getcpu, &cpu, NULL, NULL) != 0) {
| ^~~~~~~
.../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/cpuinfo/common.h:15:58: note: in definition of macro 'CPUINFO_UNLIKELY'
15 | #define CPUINFO_UNLIKELY(condition) (__builtin_expect(!!(condition), 0))
| ^~~~~~~~~
Signed-off-by: Zoltán Böszörményi <[email protected]>
Fixes the build for x86_64. Signed-off-by: Zoltán Böszörményi <[email protected]>
…_XNNPACK on x86-64
This fixes the runtime error for x86-64 targets:
>>> import tflite_runtime.interpreter as tflite
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
import tflite_runtime.interpreter as tflite
File "/usr/lib/python3.13/site-packages/tflite_runtime/interpreter.py", line 34, in <module>
from tflite_runtime import _pywrap_tensorflow_interpreter_wrapper as _interpreter_wrapper
ImportError: /usr/lib/python3.13/site-packages/tflite_runtime/_pywrap_tensorflow_interpreter_wrapper.so: undefined symbol: TfLiteXNNPackDelegateOptionsDefault
Signed-off-by: Zoltán Böszörményi <[email protected]>
Signed-off-by: Zoltán Böszörményi <[email protected]>
…apper lib
This fixes the runtime error when importing tflite_runtime.interpreter:
Traceback (most recent call last):
File "/usr/share/tensorflow/lite/examples/python/label_image.py", line 22, in <module>
import tflite_runtime.interpreter as tflite
File "/usr/lib/python3.13/site-packages/tflite_runtime/interpreter.py", line 34, in <module>
from tflite_runtime import _pywrap_tensorflow_interpreter_wrapper as _interpreter_wrapper
ImportError: /usr/lib/python3.13/site-packages/tflite_runtime/_pywrap_tensorflow_interpreter_wrapper.so: cannot enable executable stack as shared object requires: Invalid argument
Signed-off-by: Zoltán Böszörményi <[email protected]>
Signed-off-by: Zoltán Böszörményi <[email protected]>
Contributor
Author
|
Rebased over the RISC-V fixes. Should I open a separate PR for |
NobuoTsukamoto
approved these changes
Jul 21, 2025
Owner
|
Thank you very much for the pull request. |
Owner
Please make the PR for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set TENSORFLOW_TARGET_ARCH for every target arch from ${TARGET_ARCH}.
This fixes the configure warning when building for x86_64:
CMake Warning at .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/CMakeLists.txt:93 (MESSAGE):
Target processor architecture is not specified. cpuinfo will compile, but
cpuinfo_initialize() will always fail.
and the subsequent build error:
In file included from .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/cpuinfo/internal-api.h:11,
from .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/api.c:5:
.../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/api.c: In function 'cpuinfo_get_current_processor': .../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/api.c:318:30: error: implicit declaration of function 'syscall' [-Wimplicit-function-declaration]
318 | if CPUINFO_UNLIKELY (syscall(__NR_getcpu, &cpu, NULL, NULL) != 0) {
| ^~~~~~~
.../corei7-64-oe-linux/python3-tensorflow-lite/2.19.0/build/cpuinfo/src/cpuinfo/common.h:15:58: note: in definition of macro 'CPUINFO_UNLIKELY'
15 | #define CPUINFO_UNLIKELY(condition) (__builtin_expect(!!(condition), 0))
| ^~~~~~~~~