tensorflow: drop Upstream-Status inside third_party .patch files
PATCH 1/2 tensorflow: drop Upstream-Status inside third_party .patch files
* these patches create:
third_party/0001-XNNPACK-support-32-bit-x86.patch third_party/0001-cpuinfo-support-32-bit-x86.patch third_party/0001-hardcode-go-SDKS.patch third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch
which aren't applied by do_patch bitbake task but by bazel:
tensorflow $ grep patch_file tensorflow/workspace2.bzl | head -n 2
tensorflow/workspace2.bzl: patch_file = ["//third_party:0001-XNNPACK-support-32-bit-x86.patch"], tensorflow/workspace2.bzl: patch_file = ["//third_party:0001-cpuinfo-support-32-bit-x86.patch"], tensorflow/workspace2.bzl: patch_file = ["//third_party:0001-hardcode-go-SDKS.patch"], third_party/eigen3/workspace.bzl: patch_file = ["//third_party/eigen3:0001-workaround-ice-failure-while-building-from-source-wi.patch"],
so they don't really need Upstream-Status and including it there might cause false possitive e.g. in 0001-fix-XNNPACK-build-failure-for-qemuarm.patch
ERROR: tensorflow-lite-2.10.0-r0 do_patch: QA Issue: Malformed Upstream-Status in patch recipes-framework/tensorflow/tensorflow-lite/0001-fix-XNNPACK-build-failure-for-qemuarm.patch
Please correct according to https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status :
Upstream-Status: Inappropriate [oe specific] [patch-status]
ERROR: tensorflow-lite-2.10.0-r0 do_patch: Fatal QA errors were found, failing task.
caused by extra space before Upstream-Status
--- .../tensorflow/files/0001-hardcode-go-SDKS.patch | 4 +--- .../files/0001-support-32-bit-x64-and-arm-for-yocto.patch | 7 ++----- ...rd_party-eigen_archive-workaround-ice-failure-whi.patch | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-)
recipes-framework/tensorflow/files/0001-hardcode-go-SDKS.patch +1 -3
@@ -38,7 +38,7 @@ new file mode 100644 index 00000000000..b51d7262f4c --- /dev/null +++ b/third_party/0001-hardcode-go-SDKS.patch -@@ -0,0 +1,49 @@ +@@ -0,0 +1,47 @@ +From 34242e73f76eff09ee33152c58c3be650331b7ff Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Thu, 1 Dec 2022 15:07:10 +0000
@@ -53,8 +53,6 @@ index 00000000000..b51d7262f4c +downloaded archive, so hardcode go SDKS list files rather than +fetch from internet + -+Upstream-Status: Inappropriate [Yocto specific] -+ +Signed-off-by: Hongxu Jia <[email protected]> +--- + go/private/sdk.bzl | 7 +++++++
recipes-framework/tensorflow/files/0001-support-32-bit-x64-and-arm-for-yocto.patch +2 -5
@@ -56,7 +56,7 @@ new file mode 100644 index 00000000000..9d7e91ff9fe --- /dev/null +++ b/third_party/0001-XNNPACK-support-32-bit-x86.patch -@@ -0,0 +1,29 @@ +@@ -0,0 +1,27 @@ +From 13f013db421c5aefa021f3b75d9d8554ad4fde52 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Fri, 1 Mar 2024 00:35:18 -0800
@@ -64,8 +64,6 @@ index 00000000000..9d7e91ff9fe + +Use android_x86 as a workaround to support 32 bit x86 + -+Upstream-Status: Inappropriate [oe specific] -+ +Signed-off-by: Hongxu Jia <[email protected]> +--- + build_config/BUILD.bazel | 1 -
@@ -91,7 +89,7 @@ new file mode 100644 index 00000000000..0c83cf01675 --- /dev/null +++ b/third_party/0001-cpuinfo-support-32-bit-x86.patch -@@ -0,0 +1,28 @@ +@@ -0,0 +1,27 @@ +From f5e52b2db5516954dab9026e4f386982c4c3c3a4 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Mon, 19 Sep 2022 00:10:18 -0700
@@ -99,7 +97,6 @@ index 00000000000..0c83cf01675 + +Use android_x86 as a workaround to support 32 bit x86 + -+Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Hongxu Jia <[email protected]> +--- + BUILD.bazel | 1 -
recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch +1 -3
@@ -24,7 +24,7 @@ new file mode 100644 index 00000000000..436f35fca13 --- /dev/null +++ b/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch -@@ -0,0 +1,69 @@ +@@ -0,0 +1,67 @@ +From 035fd96026e18d61c19da038ab2b0f7a61e97799 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Mon, 19 Sep 2022 01:08:18 -0700
@@ -37,8 +37,6 @@ index 00000000000..436f35fca13 +But we could not patch on native gcc,so try to workaround, +Refer: https://github.com/tensorflow/tensorflow/issues/25323 + -+Upstream-Status: Inappropriate [wr-installer specific] -+ +Signed-off-by: Hongxu Jia <[email protected]> +--- + unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h | 3 ++-
Signature · 1 line
2.48.1
PATCH 2/2 tensorflow: refresh and rename the .patch files
* use --no-signature as devtool does to avoid unnecessary git signature changes
* rename to have increasing numbers in the order how they should be applied (so they can be all easily applied with single git am call), the only exception is 0001-disable-avxvnni-for-x86.patch used only in native builds
---
...el-to-workaround-bazel-paralle-issue.patch | 9 +++----
..._archive-workaround-ice-failure-whi.patch} | 13 ++++------
...ains_repositories-to-support-offlin.patch} | 9 +++----
...config.patch => 0004-drop-v2-config.patch} | 9 +++----
...sysconfig.get_python_lib-with-sysco.patch} | 5 +---
...SDKS.patch => 0006-hardcode-go-SDKS.patch} | 15 +++++-------
...ure.patch => 0007-fix-build-failure.patch} | 5 +---
...tch => 0008-support-hermetic-Python.patch} | 7 ++----
...metic-python3-support-offline-build.patch} | 7 ++----
...patch => 0010-Fix-build-with-gcc-12.patch} | 5 +---
...oolchain-to-support-cross-compiling.patch} | 13 ++++------
...tch => 0011-disable-avxvnni-for-x86.patch} | 5 +---
...low-lite-examples-label_image-label.patch} | 11 ++++-----
..._image-tweak-default-model-location.patch} | 13 ++++------
...e.lite-tweak-default-model-location.patch} | 5 +---
...atureOrDie-use-warning-to-avoid-die.patch} | 9 +++----
...upport-32-bit-x64-and-arm-for-yocto.patch} | 21 +++++++---------
...api_gen_binary_target-as-host-tools.patch} | 5 +---
.../tensorflow/tensorflow-lite_2.16.1.bb | 22 ++++++++---------
.../tensorflow/tensorflow-native_2.16.1.bb | 2 +-
recipes-framework/tensorflow/tensorflow.inc | 22 ++++++++---------
.../tensorflow/tensorflow_2.16.1.bb | 24 +++++++++----------
22 files changed, 91 insertions(+), 145 deletions(-)
rename recipes-framework/tensorflow/files/{0001-third_party-eigen_archive-workaround-ice-failure-whi.patch => 0002-third_party-eigen_archive-workaround-ice-failure-whi.patch} (95%)
rename recipes-framework/tensorflow/files/{0001-drop-bazel_toolchains_repositories-to-support-offlin.patch => 0003-drop-bazel_toolchains_repositories-to-support-offlin.patch} (89%)
rename recipes-framework/tensorflow/files/{0001-drop-v2-config.patch => 0004-drop-v2-config.patch} (79%)
rename recipes-framework/tensorflow/files/{0002-Replace-distutils.sysconfig.get_python_lib-with-sysc.patch => 0005-eplace-distutils.sysconfig.get_python_lib-with-sysco.patch} (97%)
rename recipes-framework/tensorflow/files/{0001-hardcode-go-SDKS.patch => 0006-hardcode-go-SDKS.patch} (91%)
rename recipes-framework/tensorflow/files/{0001-fix-build-failure.patch => 0007-fix-build-failure.patch} (96%)
rename recipes-framework/tensorflow/files/{0001-support-hermetic-Python.patch => 0008-support-hermetic-Python.patch} (95%)
rename recipes-framework/tensorflow/files/{0001-make-hermetic-python3-support-offline-build.patch => 0009-make-hermetic-python3-support-offline-build.patch} (96%)
rename recipes-framework/tensorflow/files/{0001-Fix-build-with-gcc-12.patch => 0010-Fix-build-with-gcc-12.patch} (92%)
rename recipes-framework/tensorflow/files/{0001-add-yocto-toolchain-to-support-cross-compiling.patch => 0011-add-yocto-toolchain-to-support-cross-compiling.patch} (92%)
rename recipes-framework/tensorflow/files/{0001-disable-avxvnni-for-x86.patch => 0011-disable-avxvnni-for-x86.patch} (96%)
rename recipes-framework/tensorflow/files/{0001-fix-build-tensorflow-lite-examples-label_image-label.patch => 0012-fix-build-tensorflow-lite-examples-label_image-label.patch} (85%)
rename recipes-framework/tensorflow/files/{0001-label_image-tweak-default-model-location.patch => 0013-label_image-tweak-default-model-location.patch} (89%)
rename recipes-framework/tensorflow/files/{0001-label_image.lite-tweak-default-model-location.patch => 0014-label_image.lite-tweak-default-model-location.patch} (94%)
rename recipes-framework/tensorflow/files/{0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch => 0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch} (90%)
rename recipes-framework/tensorflow/files/{0001-support-32-bit-x64-and-arm-for-yocto.patch => 0016-support-32-bit-x64-and-arm-for-yocto.patch} (89%)
rename recipes-framework/tensorflow/files/{0001-build-api_gen_binary_target-as-host-tools.patch => 0017-build-api_gen_binary_target-as-host-tools.patch} (98%)recipes-framework/tensorflow/files/0001-use-local-bazel-to-workaround-bazel-paralle-issue.patch +3 -6
@@ -1,4 +1,4 @@ -From bbdf1bbca17f8bce98e32b25aa9bfadc8f465f24 Mon Sep 17 00:00:00 2001 +From 3a89b6024e27239d645b73804318fe23157787b8 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Sun, 15 May 2022 23:59:17 -0700 Subject: [PATCH] use local bazel to workaround bazel paralle issue
@@ -12,10 +12,10 @@ Signed-off-by: Julien STEPHAN <[email protected]> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py -index dae3dce89d3..979f00f3633 100644 +index c1cb2016201..a160912ba0b 100644 --- a/configure.py +++ b/configure.py -@@ -475,7 +475,7 @@ def check_bazel_version(min_version, max_version): +@@ -423,7 +423,7 @@ def retrieve_bazel_version(): Returns: The bazel version detected. """
@@ -24,6 +24,3 @@ index dae3dce89d3..979f00f3633 100644 if bazel_executable is None: bazel_executable = which('bazelisk') if bazel_executable is None: --- -2.36.0 -
recipes-framework/tensorflow/files/0002-third_party-eigen_archive-workaround-ice-failure-whi.patch renamed from recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch +5 -8
@@ -1,4 +1,4 @@ -From 385074d9300c18293a42c9d8ca9fb12cbffccb80 Mon Sep 17 00:00:00 2001 +From fda2e557683c2a38b7bbc9eb20d4f8a4f557ac03 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 16 May 2022 23:15:47 -0700 Subject: [PATCH] third_party/eigen_archive:workaround ice failure while
@@ -14,14 +14,14 @@ Upstream-Status: Inappropriate [wr-installer specific] Signed-off-by: Hongxu Jia <[email protected]> --- - ...ailure-while-building-from-source-wi.patch | 69 +++++++++++++++++++ + ...ailure-while-building-from-source-wi.patch | 67 +++++++++++++++++++ third_party/eigen3/workspace.bzl | 1 + - 2 files changed, 70 insertions(+) + 2 files changed, 68 insertions(+) create mode 100644 third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch diff --git a/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch b/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch new file mode 100644 -index 00000000000..436f35fca13 +index 00000000000..6032258ed82 --- /dev/null +++ b/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch @@ -0,0 +1,67 @@
@@ -93,7 +93,7 @@ index 00000000000..436f35fca13 +2.37.1 + diff --git a/third_party/eigen3/workspace.bzl b/third_party/eigen3/workspace.bzl -index 1380722ee67..722cfbece83 100644 +index 027454e46dd..6871cd1b5dd 100644 --- a/third_party/eigen3/workspace.bzl +++ b/third_party/eigen3/workspace.bzl @@ -14,6 +14,7 @@ def repo():
@@ -104,6 +104,3 @@ index 1380722ee67..722cfbece83 100644 sha256 = EIGEN_SHA256, strip_prefix = "eigen-{commit}".format(commit = EIGEN_COMMIT), urls = tf_mirror_urls("https://gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT)), --- -2.37.1 -
recipes-framework/tensorflow/files/0003-drop-bazel_toolchains_repositories-to-support-offlin.patch renamed from recipes-framework/tensorflow/files/0001-drop-bazel_toolchains_repositories-to-support-offlin.patch +3 -6
@@ -1,4 +1,4 @@ -From 6bb9c02aae20996a6e4edd8fe743a90ce8d677aa Mon Sep 17 00:00:00 2001 +From 280d8828009ecdf442e98f3d9315ff62d1bb16c1 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Sun, 18 Sep 2022 23:52:34 -0700 Subject: [PATCH] drop bazel_toolchains_repositories to support offline build
@@ -14,7 +14,7 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 3 deletions(-) diff --git a/tensorflow/workspace0.bzl b/tensorflow/workspace0.bzl -index c3c081b19ef..445de71bb13 100644 +index d8b53e1ef8b..2e80169790c 100644 --- a/tensorflow/workspace0.bzl +++ b/tensorflow/workspace0.bzl @@ -2,7 +2,6 @@
@@ -25,7 +25,7 @@ index c3c081b19ef..445de71bb13 100644 load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies") load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") -@@ -104,8 +103,6 @@ def workspace(): +@@ -105,8 +104,6 @@ def workspace(): ], )
@@ -34,6 +34,3 @@ index c3c081b19ef..445de71bb13 100644 # Apple rules for Bazel. https://github.com/bazelbuild/rules_apple. # Note: We add this to fix Kokoro builds. # The rules below call into `rules_proto` but the hash has changed and --- -2.37.1 -
recipes-framework/tensorflow/files/0004-drop-v2-config.patch renamed from recipes-framework/tensorflow/files/0001-drop-v2-config.patch +3 -6
@@ -1,4 +1,4 @@ -From 104224b8b30f74dabed893aa057f400ad7cd2695 Mon Sep 17 00:00:00 2001 +From bf8ccc7a5907b2d241d77dbb7ef4f7f979e651e2 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 16 May 2022 00:10:55 -0700 Subject: [PATCH] drop v2 config
@@ -11,10 +11,10 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 3 deletions(-) diff --git a/.bazelrc b/.bazelrc -index b6a72c1e5d3..a71ade6950f 100644 +index 315669e7930..deb1a918146 100644 --- a/.bazelrc +++ b/.bazelrc -@@ -138,9 +138,6 @@ build --define=with_xla_support=true +@@ -117,9 +117,6 @@ build --define=with_xla_support=true # TODO(mihaimaruseac): Document this option or remove if no longer needed build --config=short_logs
@@ -24,6 +24,3 @@ index b6a72c1e5d3..a71ade6950f 100644 # Disable AWS/HDFS support by default build --define=no_aws_support=true build --define=no_hdfs_support=true --- -2.36.0 -
recipes-framework/tensorflow/files/0005-eplace-distutils.sysconfig.get_python_lib-with-sysco.patch renamed from recipes-framework/tensorflow/files/0002-Replace-distutils.sysconfig.get_python_lib-with-sysc.patch +1 -4
@@ -1,4 +1,4 @@ -From 3b3b8bc65c30fb5ac2a3d5beaa424b27ceb41dc8 Mon Sep 17 00:00:00 2001 +From ed741b43579f3b543832daf66486fb8522dec9c4 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Thu, 29 Feb 2024 23:26:53 -0800 Subject: [PATCH] eplace distutils.sysconfig.get_python_lib() with
@@ -68,6 +68,3 @@ index 6a4ab4e655f..012c54f7fed 100644 _site_packages_dirs = list(set(_site_packages_dirs)) --- -2.42.0 -
recipes-framework/tensorflow/files/0006-hardcode-go-SDKS.patch renamed from recipes-framework/tensorflow/files/0001-hardcode-go-SDKS.patch +6 -9
@@ -1,4 +1,4 @@ -From c0fa623063942d53f9f65fb14ada4cbec5cc9b9a Mon Sep 17 00:00:00 2001 +From 0d7249addc24abd868ee9850ef2f4077ccd84c18 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Thu, 1 Dec 2022 23:10:37 +0800 Subject: [PATCH] hardcode go SDKS
@@ -17,15 +17,15 @@ Upstream-Status: Inappropriate [Yocto specific] Signed-off-by: Hongxu Jia <[email protected]> --- tensorflow/workspace2.bzl | 1 + - third_party/0001-hardcode-go-SDKS.patch | 49 +++++++++++++++++++++++++ - 2 files changed, 50 insertions(+) + third_party/0001-hardcode-go-SDKS.patch | 47 +++++++++++++++++++++++++ + 2 files changed, 48 insertions(+) create mode 100644 third_party/0001-hardcode-go-SDKS.patch diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl -index 1b947d006fe..410a0ba8b54 100644 +index 9e15c75c183..3ef4a544f1a 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl -@@ -883,6 +883,7 @@ def _tf_repositories(): +@@ -805,6 +805,7 @@ def _tf_repositories(): # - patch upb so that it's compatible with Bazel 6.0, the latest version of upb doesn't work with the old grpc version. tf_http_archive( name = "io_bazel_rules_go",
@@ -35,7 +35,7 @@ index 1b947d006fe..410a0ba8b54 100644 ) diff --git a/third_party/0001-hardcode-go-SDKS.patch b/third_party/0001-hardcode-go-SDKS.patch new file mode 100644 -index 00000000000..b51d7262f4c +index 00000000000..b66926be35d --- /dev/null +++ b/third_party/0001-hardcode-go-SDKS.patch @@ -0,0 +1,47 @@
@@ -86,6 +86,3 @@ index 00000000000..b51d7262f4c +-- +2.32.0 + --- -2.27.0 -
recipes-framework/tensorflow/files/0007-fix-build-failure.patch renamed from recipes-framework/tensorflow/files/0001-fix-build-failure.patch +1 -4
@@ -1,4 +1,4 @@ -From cd26d8228aef93559dc11c7584d8cf8d0a529d1d Mon Sep 17 00:00:00 2001 +From 5e62da8b26fc868d26b6d9dd1561ffdfd99998e9 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 4 Mar 2024 15:07:58 +0800 Subject: [PATCH] fix build failure
@@ -49,6 +49,3 @@ index 2a49fdfce60..24c2bbf82ef 100644 ] + tsl_async_value_deps() package( --- -2.27.0 -
recipes-framework/tensorflow/files/0008-support-hermetic-Python.patch renamed from recipes-framework/tensorflow/files/0001-support-hermetic-Python.patch +2 -5
@@ -1,4 +1,4 @@ -From cd7dc62667df74f9e4c8293dbc087a3ed10c8890 Mon Sep 17 00:00:00 2001 +From f05fc1268ef38b36d35397c46a49b0095270d643 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 4 Mar 2024 17:44:35 +0800 Subject: [PATCH] support hermetic Python
@@ -58,7 +58,7 @@ index 675709d4314..65b3fd20b4f 100644 win_def_file = ":pywrap_tensorflow_filtered_def_file", deps = [ diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl -index 45c597b3ef4..d821a60aa5f 100644 +index 51ae807cae7..a2cdbfd73fd 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -3304,6 +3304,8 @@ def tf_python_pybind_static_deps(testonly = False):
@@ -70,6 +70,3 @@ index 45c597b3ef4..d821a60aa5f 100644 ] static_deps += tsl_async_value_deps() static_deps += [] if not testonly else [ --- -2.27.0 -
recipes-framework/tensorflow/files/0009-make-hermetic-python3-support-offline-build.patch renamed from recipes-framework/tensorflow/files/0001-make-hermetic-python3-support-offline-build.patch +2 -5
@@ -1,4 +1,4 @@ -From e060b1fa679f809407e5597bd045105914fb1c05 Mon Sep 17 00:00:00 2001 +From fb71dd4dfd574326c29c5d8ccda5a6e3f73c942b Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Fri, 8 Mar 2024 11:31:26 +0800 Subject: [PATCH] make hermetic python3 support offline build
@@ -32,7 +32,7 @@ index a697405110e..9b33f0cfdf1 100644 diff --git a/third_party/0001-support-offline-build.patch b/third_party/0001-support-offline-build.patch new file mode 100644 -index 00000000000..3804e9c7152 +index 00000000000..c540a27c818 --- /dev/null +++ b/third_party/0001-support-offline-build.patch @@ -0,0 +1,50 @@
@@ -86,6 +86,3 @@ index 00000000000..3804e9c7152 +-- +2.27.0 + --- -2.25.1 -
recipes-framework/tensorflow/files/0010-Fix-build-with-gcc-12.patch renamed from recipes-framework/tensorflow/files/0001-Fix-build-with-gcc-12.patch +1 -4
@@ -1,4 +1,4 @@ -From 150a64dc59ec3a6240fa71fc018f20f1ac0f451d Mon Sep 17 00:00:00 2001 +From e750973d0c3c9e11f4e11fb1b04875a8e052de84 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Fri, 28 Jun 2024 11:27:15 +0800 Subject: [PATCH] Fix build with gcc-12
@@ -30,6 +30,3 @@ index 4bd4c2960e1..45e73ec3831 100644 + ], + }), ) --- -2.27.0 -
recipes-framework/tensorflow/files/0011-add-yocto-toolchain-to-support-cross-compiling.patch renamed from recipes-framework/tensorflow/files/0001-add-yocto-toolchain-to-support-cross-compiling.patch +5 -8
@@ -1,4 +1,4 @@ -From 2e03e5bcd0b1e05f10f7d2d0cfede314fbfa5818 Mon Sep 17 00:00:00 2001 +From e51de51550c25c86dbadd247a0ed37bc56c07c32 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Fri, 1 Mar 2024 00:22:22 -0800 Subject: [PATCH] add yocto toolchain to support cross compiling
@@ -13,10 +13,10 @@ Signed-off-by: Hongxu Jia <[email protected]> 3 files changed, 23 insertions(+) diff --git a/WORKSPACE b/WORKSPACE -index 720fee74bd2..94095bf1914 100644 +index 9b33f0cfdf1..852ee626ff1 100644 --- a/WORKSPACE +++ b/WORKSPACE -@@ -40,3 +40,9 @@ tf_workspace1() +@@ -92,3 +92,9 @@ tf_workspace1() load("@//tensorflow:workspace0.bzl", "tf_workspace0") tf_workspace0()
@@ -27,10 +27,10 @@ index 720fee74bd2..94095bf1914 100644 + build_file = "//:BUILD.yocto_compiler", +) diff --git a/tensorflow/BUILD b/tensorflow/BUILD -index 9e724aff49b..0918af13243 100644 +index 0bf6127ffd1..fc4f0314429 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD -@@ -352,6 +352,15 @@ config_setting( +@@ -358,6 +358,15 @@ config_setting( visibility = ["//visibility:public"], )
@@ -72,6 +72,3 @@ index 3ef4a544f1a..9e4c2da9fe2 100644 # TFLite crossbuild toolchain for embeddeds Linux arm_linux_toolchain_configure( name = "local_config_embedded_arm", --- -2.42.0 -
recipes-framework/tensorflow/files/0011-disable-avxvnni-for-x86.patch renamed from recipes-framework/tensorflow/files/0001-disable-avxvnni-for-x86.patch +1 -4
@@ -1,4 +1,4 @@ -From af2df9de80e402a3632cff8e1d40a467509c7f70 Mon Sep 17 00:00:00 2001 +From 47175b6c700f31a90d49facac3b6df63846a07bb Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 18 Mar 2024 16:24:48 +0800 Subject: [PATCH] disable avxvnni for x86
@@ -63,6 +63,3 @@ index 00000000000..e07cd9bd930 +-- +2.27.0 + --- -2.25.1 -
recipes-framework/tensorflow/files/0012-fix-build-tensorflow-lite-examples-label_image-label.patch renamed from recipes-framework/tensorflow/files/0001-fix-build-tensorflow-lite-examples-label_image-label.patch +4 -7
@@ -1,4 +1,4 @@ -From 1af9e2180f680c1b0c94fbeeaee9dc522f353d07 Mon Sep 17 00:00:00 2001 +From f06f0f718d51d3f06f807842c949eb21b7cb57ad Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Tue, 17 Aug 2021 16:00:24 +0800 Subject: [PATCH] fix build //tensorflow/lite/examples/label_image:label_image
@@ -21,10 +21,10 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 8 insertions(+) diff --git a/tensorflow/lite/kernels/internal/BUILD b/tensorflow/lite/kernels/internal/BUILD -index 8c714fc282d..6ea96e4f103 100644 +index 1bbf1516f82..5873cc75471 100644 --- a/tensorflow/lite/kernels/internal/BUILD +++ b/tensorflow/lite/kernels/internal/BUILD -@@ -112,6 +112,13 @@ config_setting( +@@ -135,6 +135,13 @@ config_setting( }, )
@@ -38,7 +38,7 @@ index 8c714fc282d..6ea96e4f103 100644 config_setting( name = "haswell", values = { -@@ -235,6 +242,7 @@ selects.config_setting_group( +@@ -273,6 +280,7 @@ selects.config_setting_group( ":arm", ":arm64-v8a", ":armeabi-v7a",
@@ -46,6 +46,3 @@ index 8c714fc282d..6ea96e4f103 100644 ":armhf", ":armv7a", ":ios_armv7", --- -2.27.0 -
recipes-framework/tensorflow/files/0013-label_image-tweak-default-model-location.patch renamed from recipes-framework/tensorflow/files/0001-label_image-tweak-default-model-location.patch +5 -8
@@ -1,4 +1,4 @@ -From 17e03724c925f8d0b11c8f14699646aa498af798 Mon Sep 17 00:00:00 2001 +From fdfacf235bbe0fe8b1cb0424659ff3d74638bd7f Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 16 May 2022 00:36:00 -0700 Subject: [PATCH] label_image: tweak default model location
@@ -12,10 +12,10 @@ Signed-off-by: Hongxu Jia <[email protected]> 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tensorflow/examples/label_image/label_image.py b/tensorflow/examples/label_image/label_image.py -index 3e4bc1ddaab..83558251d77 100644 +index 4b7b79a7291..9bb182c8993 100644 --- a/tensorflow/examples/label_image/label_image.py +++ b/tensorflow/examples/label_image/label_image.py -@@ -62,10 +62,10 @@ def load_labels(label_file): +@@ -64,10 +64,10 @@ def load_labels(label_file): if __name__ == "__main__":
@@ -30,10 +30,10 @@ index 3e4bc1ddaab..83558251d77 100644 input_width = 299 input_mean = 0 diff --git a/tensorflow/examples/label_image/main.cc b/tensorflow/examples/label_image/main.cc -index 13bb5980276..38935a57dd4 100644 +index c96cdc4dd9e..b19d6797146 100644 --- a/tensorflow/examples/label_image/main.cc +++ b/tensorflow/examples/label_image/main.cc -@@ -279,11 +279,11 @@ int main(int argc, char* argv[]) { +@@ -282,11 +282,11 @@ int main(int argc, char* argv[]) { // They define where the graph and input data is located, and what kind of // input the model expects. If you train your own model, or use something // other than inception_v3, then you'll need to update these.
@@ -48,6 +48,3 @@ index 13bb5980276..38935a57dd4 100644 int32_t input_width = 299; int32_t input_height = 299; float input_mean = 0; --- -2.36.0 -
recipes-framework/tensorflow/files/0014-label_image.lite-tweak-default-model-location.patch renamed from recipes-framework/tensorflow/files/0001-label_image.lite-tweak-default-model-location.patch +1 -4
@@ -1,4 +1,4 @@ -From dd73bef88a23d29299bc6e2f3c892ed81d65a86c Mon Sep 17 00:00:00 2001 +From feb0280937d17aff99d7a4cddbd670213030c015 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Wed, 9 Dec 2020 09:53:30 +0800 Subject: [PATCH] label_image.lite: tweak default model location
@@ -30,6 +30,3 @@ index 1c00edb6558..a5bcf8c64d8 100644 int number_of_threads = 4; int number_of_results = 5; int max_profiling_buffer_entries = 1024; --- -2.18.2 -
recipes-framework/tensorflow/files/0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch renamed from recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch +3 -6
@@ -1,4 +1,4 @@ -From 1455cd4232f382b73cb4ff6dfa6ccc7bd5197428 Mon Sep 17 00:00:00 2001 +From 03ff3a3547ea31c27f6ef5581359bb7c86f09bff Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 16 May 2022 00:39:33 -0700 Subject: [PATCH] CheckFeatureOrDie: use warning to avoid die
@@ -14,10 +14,10 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 7 deletions(-) diff --git a/tensorflow/core/platform/cpu_feature_guard.cc b/tensorflow/core/platform/cpu_feature_guard.cc -index 11a438925c1..9874ed34793 100644 +index 748dc21090a..ecc9504864d 100644 --- a/tensorflow/core/platform/cpu_feature_guard.cc +++ b/tensorflow/core/platform/cpu_feature_guard.cc -@@ -36,18 +36,11 @@ void CheckFeatureOrDie(CPUFeature feature, const string& feature_name) { +@@ -36,18 +36,11 @@ void CheckFeatureOrDie(CPUFeature feature, const std::string& feature_name) { const auto error_msg = "The TensorFlow library was compiled to use " + feature_name + " instructions, but these aren't available on your machine.";
@@ -36,6 +36,3 @@ index 11a438925c1..9874ed34793 100644 } } --- -2.36.0 -
recipes-framework/tensorflow/files/0016-support-32-bit-x64-and-arm-for-yocto.patch renamed from recipes-framework/tensorflow/files/0001-support-32-bit-x64-and-arm-for-yocto.patch +9 -12
@@ -1,4 +1,4 @@ -From 161e6195a47466b354dbb9a095c5aeeba890a81a Mon Sep 17 00:00:00 2001 +From 236ce47a0cf6386ebf025f8a2ef919bf9d2ecebc Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Fri, 1 Mar 2024 00:28:25 -0800 Subject: [PATCH] support 32 bit x64 and arm for yocto
@@ -9,19 +9,19 @@ Rebase to 2.14.0 Signed-off-by: Hongxu Jia <[email protected]> --- - tensorflow/BUILD | 3 -- + tensorflow/BUILD | 3 --- tensorflow/workspace2.bzl | 2 ++ - .../0001-XNNPACK-support-32-bit-x86.patch | 29 +++++++++++++++++++ - .../0001-cpuinfo-support-32-bit-x86.patch | 28 ++++++++++++++++++ - 4 files changed, 59 insertions(+), 3 deletions(-) + .../0001-XNNPACK-support-32-bit-x86.patch | 27 +++++++++++++++++++ + .../0001-cpuinfo-support-32-bit-x86.patch | 27 +++++++++++++++++++ + 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 third_party/0001-XNNPACK-support-32-bit-x86.patch create mode 100644 third_party/0001-cpuinfo-support-32-bit-x86.patch diff --git a/tensorflow/BUILD b/tensorflow/BUILD -index 0918af13243..3684d9a8757 100644 +index fc4f0314429..1e540ba64b0 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD -@@ -269,9 +269,6 @@ config_setting( +@@ -275,9 +275,6 @@ config_setting( [], ), values = dict(
@@ -53,7 +53,7 @@ index 9e4c2da9fe2..0aed90f6203 100644 diff --git a/third_party/0001-XNNPACK-support-32-bit-x86.patch b/third_party/0001-XNNPACK-support-32-bit-x86.patch new file mode 100644 -index 00000000000..9d7e91ff9fe +index 00000000000..397405a74c1 --- /dev/null +++ b/third_party/0001-XNNPACK-support-32-bit-x86.patch @@ -0,0 +1,27 @@
@@ -86,7 +86,7 @@ index 00000000000..9d7e91ff9fe + diff --git a/third_party/0001-cpuinfo-support-32-bit-x86.patch b/third_party/0001-cpuinfo-support-32-bit-x86.patch new file mode 100644 -index 00000000000..0c83cf01675 +index 00000000000..cd6b27eaea3 --- /dev/null +++ b/third_party/0001-cpuinfo-support-32-bit-x86.patch @@ -0,0 +1,27 @@
@@ -117,6 +117,3 @@ index 00000000000..0c83cf01675 +-- +2.37.1 + --- -2.42.0 -
recipes-framework/tensorflow/files/0017-build-api_gen_binary_target-as-host-tools.patch renamed from recipes-framework/tensorflow/files/0001-build-api_gen_binary_target-as-host-tools.patch +1 -4
@@ -1,4 +1,4 @@ -From e1471b0dd1eb2c6ee152f749437cab65c2b27ef3 Mon Sep 17 00:00:00 2001 +From 4d84b9cd4580cefcb73d2a68d6ae261eda28a589 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Fri, 1 Mar 2024 00:41:25 -0800 Subject: [PATCH] build api_gen_binary_target as host tools
@@ -44,6 +44,3 @@ index c41aeecc476..a087557ad0f 100644 "loading_value": attr.string(mandatory = True), "api_packages_path": attr.output(), }, --- -2.42.0 -
recipes-framework/tensorflow/tensorflow-lite_2.16.1.bb +11 -11
@@ -1,17 +1,17 @@ include tensorflow.inc SRC_URI += " \ - file://0001-add-yocto-toolchain-to-support-cross-compiling.patch \ - file://0001-fix-build-tensorflow-lite-examples-label_image-label.patch \ - file://0001-label_image-tweak-default-model-location.patch \ - file://0001-label_image.lite-tweak-default-model-location.patch \ - file://0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch \ - file://0001-support-32-bit-x64-and-arm-for-yocto.patch \ - file://BUILD.in \ - file://BUILD.yocto_compiler \ - file://cc_config.bzl.tpl \ - file://yocto_compiler_configure.bzl \ - " + file://0011-add-yocto-toolchain-to-support-cross-compiling.patch \ + file://0012-fix-build-tensorflow-lite-examples-label_image-label.patch \ + file://0013-label_image-tweak-default-model-location.patch \ + file://0014-label_image.lite-tweak-default-model-location.patch \ + file://0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch \ + file://0016-support-32-bit-x64-and-arm-for-yocto.patch \ + file://BUILD.in \ + file://BUILD.yocto_compiler \ + file://cc_config.bzl.tpl \ + file://yocto_compiler_configure.bzl \ +" SRC_URI += "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz;name=model-inv3" SRC_URI[model-inv3.md5sum] = "a904ddf15593d03c7dd786d552e22d73"
recipes-framework/tensorflow/tensorflow-native_2.16.1.bb +1 -1
@@ -1,7 +1,7 @@ include tensorflow.inc SRC_URI += " \ - file://0001-disable-avxvnni-for-x86.patch \ + file://0011-disable-avxvnni-for-x86.patch \ " inherit native
recipes-framework/tensorflow/tensorflow.inc +11 -11
@@ -11,17 +11,17 @@ DEPENDS = " \ " SRCREV = "5bc9d26649cca274750ad3625bd93422617eed4b" SRC_URI = "git://github.com/tensorflow/tensorflow.git;branch=r2.16;protocol=https \ - file://0001-use-local-bazel-to-workaround-bazel-paralle-issue.patch \ - file://0001-third_party-eigen_archive-workaround-ice-failure-whi.patch \ - file://0001-drop-bazel_toolchains_repositories-to-support-offlin.patch \ - file://0001-drop-v2-config.patch \ - file://0002-Replace-distutils.sysconfig.get_python_lib-with-sysc.patch \ - file://0001-hardcode-go-SDKS.patch \ - file://0001-fix-build-failure.patch \ - file://0001-support-hermetic-Python.patch \ - file://0001-make-hermetic-python3-support-offline-build.patch \ - file://0001-Fix-build-with-gcc-12.patch \ - " + file://0001-use-local-bazel-to-workaround-bazel-paralle-issue.patch \ + file://0002-third_party-eigen_archive-workaround-ice-failure-whi.patch \ + file://0003-drop-bazel_toolchains_repositories-to-support-offlin.patch \ + file://0004-drop-v2-config.patch \ + file://0005-eplace-distutils.sysconfig.get_python_lib-with-sysco.patch \ + file://0006-hardcode-go-SDKS.patch \ + file://0007-fix-build-failure.patch \ + file://0008-support-hermetic-Python.patch \ + file://0009-make-hermetic-python3-support-offline-build.patch \ + file://0010-Fix-build-with-gcc-12.patch \ +" S = "${WORKDIR}/git"
recipes-framework/tensorflow/tensorflow_2.16.1.bb +12 -12
@@ -1,18 +1,18 @@ include tensorflow.inc SRC_URI += " \ - file://0001-add-yocto-toolchain-to-support-cross-compiling.patch \ - file://0001-fix-build-tensorflow-lite-examples-label_image-label.patch \ - file://0001-label_image-tweak-default-model-location.patch \ - file://0001-label_image.lite-tweak-default-model-location.patch \ - file://0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch \ - file://0001-support-32-bit-x64-and-arm-for-yocto.patch \ - file://0001-build-api_gen_binary_target-as-host-tools.patch \ - file://BUILD.in \ - file://BUILD.yocto_compiler \ - file://cc_config.bzl.tpl \ - file://yocto_compiler_configure.bzl \ - " + file://0011-add-yocto-toolchain-to-support-cross-compiling.patch \ + file://0012-fix-build-tensorflow-lite-examples-label_image-label.patch \ + file://0013-label_image-tweak-default-model-location.patch \ + file://0014-label_image.lite-tweak-default-model-location.patch \ + file://0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch \ + file://0016-support-32-bit-x64-and-arm-for-yocto.patch \ + file://0017-build-api_gen_binary_target-as-host-tools.patch \ + file://BUILD.in \ + file://BUILD.yocto_compiler \ + file://cc_config.bzl.tpl \ + file://yocto_compiler_configure.bzl \ +" SRC_URI += "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz;name=model-inv3" SRC_URI[model-inv3.md5sum] = "a904ddf15593d03c7dd786d552e22d73"
Signature · 1 line
2.48.1