All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-tensorflow][PATCH] tensorflow.inc: fix fetch of LLVM for XLA
@ 2026-10-28 12:20 Daniel Drake
  2026-10-28 12:30 ` [yocto-patches] " Martin Jansa
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2026-10-28 12:20 UTC (permalink / raw)
  To: yocto-patches; +Cc: Hongxu Jia, Hongxu Jia, Daniel Drake

Building tensorflow-lite fails in do_compile when Bazel fetches llvm-raw:

  WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/909041e4802c4b9a2223ca04099f35bf1dbbd460.tar.gz
  failed: class java.io.FileNotFoundException GET returned 404 Not Found
  ...
  Error in download_and_extract: java.io.IOException: Error downloading [...]:
  Checksum was 00b1077e029fa57e6f2d9ac24936a49acf23ebc051b04f487131116258be6248
  but wanted 3f986184ee126677dbd77edb16d6b82c057ec869fefd7a9871979941e52e837a

The archive pinned by XLA is not on mirror.tensorflow.org, and the archive
GitHub now generates for the same LLVM commit has a different checksum, so
the pin can no longer be satisfied from either URL.

Pin the checksum of the archive GitHub currently serves. Future upstream
releases will point to a newer LLVM commit.

Signed-off-by: Daniel Drake <ddrake@baylibre.com>
---
 ...01-xla-update-sha256-of-LLVM-archive.patch | 28 +++++++++++++++++++
 recipes-framework/tensorflow/tensorflow.inc   |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 recipes-framework/tensorflow/files/0001-xla-update-sha256-of-LLVM-archive.patch

diff --git a/recipes-framework/tensorflow/files/0001-xla-update-sha256-of-LLVM-archive.patch b/recipes-framework/tensorflow/files/0001-xla-update-sha256-of-LLVM-archive.patch
new file mode 100644
index 0000000..3a6cc72
--- /dev/null
+++ b/recipes-framework/tensorflow/files/0001-xla-update-sha256-of-LLVM-archive.patch
@@ -0,0 +1,28 @@
+From: Daniel Drake <ddrake@baylibre.com>
+Subject: [PATCH] xla: update sha256 of LLVM archive
+
+Bazel can no longer fetch llvm-raw. The mirror.tensorflow.org copy of the
+archive returns 404, and the archive GitHub now generates for the same LLVM
+commit has a different checksum than the one pinned here.
+
+Pin the checksum of the archive GitHub currently serves. The LLVM commit is
+unchanged.
+
+Upstream-Status: Inappropriate [workaround for a regenerated GitHub archive; upstream master pins a newer LLVM commit]
+Signed-off-by: Daniel Drake <ddrake@baylibre.com>
+---
+ third_party/xla/third_party/llvm/workspace.bzl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third_party/xla/third_party/llvm/workspace.bzl b/third_party/xla/third_party/llvm/workspace.bzl
+--- a/third_party/xla/third_party/llvm/workspace.bzl
++++ b/third_party/xla/third_party/llvm/workspace.bzl
+@@ -5,7 +5,7 @@
+ def repo(name):
+     """Imports LLVM."""
+     LLVM_COMMIT = "909041e4802c4b9a2223ca04099f35bf1dbbd460"
+-    LLVM_SHA256 = "3f986184ee126677dbd77edb16d6b82c057ec869fefd7a9871979941e52e837a"
++    LLVM_SHA256 = "00b1077e029fa57e6f2d9ac24936a49acf23ebc051b04f487131116258be6248"
+ 
+     tf_http_archive(
+         name = name,
diff --git a/recipes-framework/tensorflow/tensorflow.inc b/recipes-framework/tensorflow/tensorflow.inc
index e337519..69bfefc 100644
--- a/recipes-framework/tensorflow/tensorflow.inc
+++ b/recipes-framework/tensorflow/tensorflow.inc
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/tensorflow/tensorflow.git;branch=r2.21;protocol=http
     file://0001-set-x83_64-to-arch-of-whl.patch \
     file://0001-fix-compile-failed-with-clang-21.patch \
     file://0001-fix-clang-22.patch \
+    file://0001-xla-update-sha256-of-LLVM-archive.patch \
 "
 
 DEPENDS += " \
-- 
2.56.0


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

end of thread, other threads:[~2026-10-28 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 12:20 [meta-tensorflow][PATCH] tensorflow.inc: fix fetch of LLVM for XLA Daniel Drake
2026-10-28 12:30 ` [yocto-patches] " Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.