Skip to content

{lib}[foss/2025b] TensorFlow v2.21.0 - #26602

Open
bedroesb wants to merge 14 commits into
easybuilders:developfrom
bedroesb:TensorFlow
Open

{lib}[foss/2025b] TensorFlow v2.21.0#26602
bedroesb wants to merge 14 commits into
easybuilders:developfrom
bedroesb:TensorFlow

Conversation

@bedroesb

@bedroesb bedroesb commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Adds an easyconfig for TensorFlow 2.21.0 with foss/2025b, using flatbuffers-python 25.2.10 to avoid the CI dependency conflict. The recipe keeps TensorFlow’s C/C++ dependencies vendored, runs Bazel in batch mode to avoid lock/server startup issues, and adds a bin/tensorboard symlink for the TensorFlow sanity check. Build and tests passed: 827/827 tests.

@github-actions github-actions Bot added update 2025b issues & PRs related to 2025b common toolchains labels Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Updated software TensorFlow-2.21.0-foss-2025b.eb

Diff against TensorFlow-2.18.1-foss-2024a-CUDA-12.6.0.eb

easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.18.1-foss-2024a-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.18.1-foss-2024a-CUDA-12.6.0.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.21.0-foss-2025b.eb
index d9a3614ffd..c76d194cf0 100644
--- a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.18.1-foss-2024a-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.21.0-foss-2025b.eb
@@ -1,58 +1,44 @@
 easyblock = 'PythonBundle'
 
 name = 'TensorFlow'
-version = '2.18.1'
-versionsuffix = '-CUDA-%(cudaver)s'
+version = '2.21.0'
 
 homepage = 'https://www.tensorflow.org/'
 description = "An open-source software library for Machine Intelligence"
 
-toolchain = {'name': 'foss', 'version': '2024a'}
+toolchain = {'name': 'foss', 'version': '2025b'}
 toolchainopts = {'pic': True}
 
 builddependencies = [
-    ('hatchling', '1.24.2'),
-    ('Bazel', '6.5.0', '-Java-11'),
+    ('hatchling', '1.27.0'),
+    ('Bazel', '7.7.0', '-Java-21'),
     # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053
-    ('git', '2.45.1'),
-    ('pybind11', '2.12.0'),
+    ('git', '2.50.1'),
     ('UnZip', '6.0'),
     ('NASM', '2.16.03'),
     # Required to build some of the extensions
-    ('poetry', '1.8.3'),
-    ('Cython', '3.0.10'),
+    ('poetry', '2.1.3'),
+    ('Cython', '3.2.4'),
 ]
 
 dependencies = [
-    ('CUDA', '12.6.0', '', SYSTEM),
-    ('cuDNN', '9.5.0.50', versionsuffix, SYSTEM),
-    ('NCCL', '2.22.3', versionsuffix),
-    ('Python', '3.12.3'),
-    ('h5py', '3.12.1'),
-    ('cURL', '8.7.1'),
-    ('dill', '0.3.9'),
-    ('double-conversion', '3.3.0'),
-    ('flatbuffers', '24.3.25'),
-    ('flatbuffers-python', '24.3.25'),
-    ('giflib', '5.2.1'),
-    ('hwloc', '2.10.0'),
-    ('ICU', '75.1'),
-    ('JsonCpp', '1.9.5'),
-    ('libjpeg-turbo', '3.0.1'),
-    ('ml_dtypes', '0.5.0'),
-    ('nsync', '1.29.2'),
-    ('SQLite', '3.45.3'),
+    ('Python', '3.13.5'),
+    ('Python-bundle-PyPI', '2025.07'),
+    ('SciPy-bundle', '2025.07'),
+    ('h5py', '3.14.0'),
+    ('dill', '0.4.1'),
+    ('flatbuffers-python', '25.2.10'),
+    ('ml_dtypes', '0.5.3'),
     ('patchelf', '0.18.0'),
-    ('libpng', '1.6.43'),
-    ('snappy', '1.2.1'),
-    ('zlib', '1.3.1'),
-    ('grpcio', '1.70.0'),
-    ('wrapt', '1.16.0'),
-    ('Markdown', '3.7'),
-    ('absl-py', '2.1.0'),
-    ('tensorboard', '2.18.0'),
-    ('optree', '0.14.1'),
-    ('typing-extensions', '4.11.0'),
+    ('protobuf-python', '6.31.1'),
+    ('grpcio', '1.81.0'),
+    ('wrapt', '1.17.3'),
+    ('Markdown', '3.8.2'),
+    ('absl-py', '2.3.1'),
+    ('tensorboard', '2.20.0'),
+    ('opt-einsum', '3.4.0'),
+    ('optree', '0.18.0'),
+    ('typing-extensions', '4.14.1'),
 ]
 
 exts_list = [
@@ -69,8 +55,8 @@ exts_list = [
     ('namex', '0.0.8', {
         'checksums': ['32a50f6c565c0bb10aa76298c959507abdc0e850efe085dc38f3440fcb3aa90b'],
     }),
-    ('keras', '3.9.2', {
-        'checksums': ['322aab6418ee3de1e2bd0871b60a07f0e444e744a7e8cba79af8b42408879ecf'],
+    ('keras', '3.13.2', {
+        'checksums': ['62f0123488ac87c929c988617e14f293f7bc993811837d08bb37eff77adc85a9'],
     }),
     ('google-pasta', '0.2.0', {
         'modulename': 'pasta',
@@ -84,27 +70,17 @@ exts_list = [
     }),
     (name, version, {
         'patches': [
-            'TensorFlow-2.13.0_add-missing-system-protobuf-targets.patch',
-            'TensorFlow-2.15.1_fix-flatbuffer-license.patch',
-            'TensorFlow-2.15.1_fix-pybind11-build.patch',
-            'TensorFlow-2.15.1_add-default-shell-env.patch',
             'TensorFlow-2.4.0_dont-use-var-lock.patch',
-            'TensorFlow-2.18.1_disable-tf32-in-fused-matmul-tests.patch',
-            'TensorFlow-2.18.1_fix-patchelf.patch',
+            'TensorFlow-2.21.0_disable-tf32-in-fused-matmul-tests.patch',
             'TensorFlow-2.18.1_fix-xnnpack.patch',
             'TensorFlow-2.18.1_fixedpoint.patch',
-            'TensorFlow-2.18.1_fix-setup.py.patch',
-            'TensorFlow-2.18.1_fix-AVX512-eigen-compilation-gcc13.patch',
-            'TensorFlow-2.18.1_increase-tolerance-Conv3DBackpropFilterV2GradTest.testGradient.patch',
-            'TensorFlow-2.18.1_use-CUDA_HOME-for-libdevice-search.patch',
+            'TensorFlow-2.21.0_remove-libclang-dep.patch',
+            'TensorFlow-2.21.0_relax-flatbuffers-requirement.patch',
         ],
         'source_tmpl': 'v%(version)s.tar.gz',
         'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
         'test_script': 'TensorFlow-2.x_mnist-test.py',
-        'test_tag_filters_cpu': (
-            '-gpu,-tpu,-no_cuda_on_cpu_tap,'
-            '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only'
-        ),
+        'test_tag_filters_cpu': '-gpu,-tpu,-no_cuda_on_cpu_tap,-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only',
         'test_tag_filters_gpu': (
             'gpu,-no_gpu,-nogpu,-gpu_cupti,-no_cuda11,'
             '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only'
@@ -112,7 +88,6 @@ exts_list = [
         'test_targets': [
             '//tensorflow/core/...',
             '-//tensorflow/core:example_java_proto',
-            '-//tensorflow/core/example:example_protos_closure',
             '//tensorflow/cc/...',
             '//tensorflow/c/...',
             '//tensorflow/python/...',
@@ -127,38 +102,24 @@ exts_list = [
             '-//tensorflow/core/kernels/mkl:mkl_fused_batch_norm_op_test',
             '-//tensorflow/core/ir/importexport/tests/roundtrip/...',
         ],
-        'testopts': "--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small ",
+        'testopts': '--test_timeout=3600 --test_size_filters=small ',
         'testopts_gpu': (
-            '--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small '
+            '--test_timeout=3600 --test_size_filters=small '
             '--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute '
         ),
         'with_xla': True,
         'checksums': [
-            {'v2.18.1.tar.gz': '467c512b631e72ad5c9d5c16b23669bcf89675de630cfbb58f9dde746d34afa8'},
-            {'TensorFlow-2.13.0_add-missing-system-protobuf-targets.patch':
-             '77d8c8a5627493fc7c38b4de79d49e60ff6628b05ff969f4cd3ff9857176c459'},
-            {'TensorFlow-2.15.1_fix-flatbuffer-license.patch':
-             '2c04d5095977a628a238dbf93c5fada7159c86752a7183e64e0cf7c7ab00caf4'},
-            {'TensorFlow-2.15.1_fix-pybind11-build.patch':
-             '3bb350ac92ab99c63c951c96b3b0160699f5f16822b64f72111ebfd2275cafce'},
-            {'TensorFlow-2.15.1_add-default-shell-env.patch':
-             '3d5196b4bf2e91048dc8a18f9e8f487a223fcd973d6302e80b0d4000ea3d652b'},
+            {'v2.21.0.tar.gz': 'ef3568bb4865d6c1b2564fb5689c19b6b9a5311572cd1f2ff9198636a8520921'},
             {'TensorFlow-2.4.0_dont-use-var-lock.patch':
              'b14f2493fd2edf79abd1c4f2dde6c98a3e7d5cb9c25ab9386df874d5f072d6b5'},
-            {'TensorFlow-2.18.1_disable-tf32-in-fused-matmul-tests.patch':
-             '97ec29666f3449f2249b121d3c88a374d888732c978c8f2aa74aa5243c7088cc'},
-            {'TensorFlow-2.18.1_fix-patchelf.patch':
-             '6c9a4d8484868b68aad99527420f22ff09528db588cdb11926ec9340f0c4a816'},
+            {'TensorFlow-2.21.0_disable-tf32-in-fused-matmul-tests.patch':
+             '2f605322c9694ccf6e013f06f403496320445a093ceca6625fec616343f5fd32'},
             {'TensorFlow-2.18.1_fix-xnnpack.patch': 'baf81d7b2b61b5a923cf1f171d5e2400df6b8bd9073d3afa7a356e3bbe11984c'},
             {'TensorFlow-2.18.1_fixedpoint.patch': '5ea1eb3b32e7df5f9ae711a71778b4cae544b3380f18882186eea035873fb640'},
-            {'TensorFlow-2.18.1_fix-setup.py.patch':
-             '6a30d61fd47b773d5e3a40ba3d02288df16321ffc45500f91b666437d8ec3343'},
-            {'TensorFlow-2.18.1_fix-AVX512-eigen-compilation-gcc13.patch':
-             '976d4be56144060f2ac4351db8341c6dd72376b0d871d5fddd986548ad03c873'},
-            {'TensorFlow-2.18.1_increase-tolerance-Conv3DBackpropFilterV2GradTest.testGradient.patch':
-             '4f66f4a08e3ad65863fafb2f012ad8343e400df26754aae83030137ae5067f4e'},
-            {'TensorFlow-2.18.1_use-CUDA_HOME-for-libdevice-search.patch':
-             'b71c91478bea357944968d7409c5790404b6a5713e0a270e4e2a78d89c152d77'},
+            {'TensorFlow-2.21.0_remove-libclang-dep.patch':
+             '4ee3773d07991c7f75d6dd4033ccf1bb9b017de478b39b4ffb6563a6bd66b981'},
+            {'TensorFlow-2.21.0_relax-flatbuffers-requirement.patch':
+             'c500796a1fe1f3de8322b1a1abeefbd3714fb255e6600d65e3815e20484c45ee'},
         ],
     }),
 ]
Diff against TensorFlow-2.18.1-foss-2024a.eb

easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.18.1-foss-2024a.eb

diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.18.1-foss-2024a.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.21.0-foss-2025b.eb
index dd517ce31c..c76d194cf0 100644
--- a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.18.1-foss-2024a.eb
+++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.21.0-foss-2025b.eb
@@ -1,54 +1,44 @@
 easyblock = 'PythonBundle'
 
 name = 'TensorFlow'
-version = '2.18.1'
+version = '2.21.0'
 
 homepage = 'https://www.tensorflow.org/'
 description = "An open-source software library for Machine Intelligence"
 
-toolchain = {'name': 'foss', 'version': '2024a'}
+toolchain = {'name': 'foss', 'version': '2025b'}
 toolchainopts = {'pic': True}
 
 builddependencies = [
-    ('hatchling', '1.24.2'),
-    ('Bazel', '6.5.0', '-Java-11'),
+    ('hatchling', '1.27.0'),
+    ('Bazel', '7.7.0', '-Java-21'),
     # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053
-    ('git', '2.45.1'),
-    ('pybind11', '2.12.0'),
+    ('git', '2.50.1'),
     ('UnZip', '6.0'),
     ('NASM', '2.16.03'),
     # Required to build some of the extensions
-    ('poetry', '1.8.3'),
-    ('Cython', '3.0.10'),
+    ('poetry', '2.1.3'),
+    ('Cython', '3.2.4'),
 ]
 
 dependencies = [
-    ('Python', '3.12.3'),
-    ('h5py', '3.12.1'),
-    ('cURL', '8.7.1'),
-    ('dill', '0.3.9'),
-    ('double-conversion', '3.3.0'),
-    ('flatbuffers', '24.3.25'),
-    ('flatbuffers-python', '24.3.25'),
-    ('giflib', '5.2.1'),
-    ('hwloc', '2.10.0'),
-    ('ICU', '75.1'),
-    ('JsonCpp', '1.9.5'),
-    ('libjpeg-turbo', '3.0.1'),
-    ('ml_dtypes', '0.5.0'),
-    ('nsync', '1.29.2'),
-    ('SQLite', '3.45.3'),
+    ('Python', '3.13.5'),
+    ('Python-bundle-PyPI', '2025.07'),
+    ('SciPy-bundle', '2025.07'),
+    ('h5py', '3.14.0'),
+    ('dill', '0.4.1'),
+    ('flatbuffers-python', '25.2.10'),
+    ('ml_dtypes', '0.5.3'),
     ('patchelf', '0.18.0'),
-    ('libpng', '1.6.43'),
-    ('snappy', '1.2.1'),
-    ('zlib', '1.3.1'),
-    ('grpcio', '1.70.0'),
-    ('wrapt', '1.16.0'),
-    ('Markdown', '3.7'),
-    ('absl-py', '2.1.0'),
-    ('tensorboard', '2.18.0'),
-    ('optree', '0.14.1'),
-    ('typing-extensions', '4.11.0'),
+    ('protobuf-python', '6.31.1'),
+    ('grpcio', '1.81.0'),
+    ('wrapt', '1.17.3'),
+    ('Markdown', '3.8.2'),
+    ('absl-py', '2.3.1'),
+    ('tensorboard', '2.20.0'),
+    ('opt-einsum', '3.4.0'),
+    ('optree', '0.18.0'),
+    ('typing-extensions', '4.14.1'),
 ]
 
 exts_list = [
@@ -65,8 +55,8 @@ exts_list = [
     ('namex', '0.0.8', {
         'checksums': ['32a50f6c565c0bb10aa76298c959507abdc0e850efe085dc38f3440fcb3aa90b'],
     }),
-    ('keras', '3.9.2', {
-        'checksums': ['322aab6418ee3de1e2bd0871b60a07f0e444e744a7e8cba79af8b42408879ecf'],
+    ('keras', '3.13.2', {
+        'checksums': ['62f0123488ac87c929c988617e14f293f7bc993811837d08bb37eff77adc85a9'],
     }),
     ('google-pasta', '0.2.0', {
         'modulename': 'pasta',
@@ -80,17 +70,12 @@ exts_list = [
     }),
     (name, version, {
         'patches': [
-            'TensorFlow-2.13.0_add-missing-system-protobuf-targets.patch',
-            'TensorFlow-2.15.1_fix-flatbuffer-license.patch',
-            'TensorFlow-2.15.1_fix-pybind11-build.patch',
-            'TensorFlow-2.15.1_add-default-shell-env.patch',
             'TensorFlow-2.4.0_dont-use-var-lock.patch',
-            'TensorFlow-2.18.1_disable-tf32-in-fused-matmul-tests.patch',
-            'TensorFlow-2.18.1_fix-patchelf.patch',
+            'TensorFlow-2.21.0_disable-tf32-in-fused-matmul-tests.patch',
             'TensorFlow-2.18.1_fix-xnnpack.patch',
             'TensorFlow-2.18.1_fixedpoint.patch',
-            'TensorFlow-2.18.1_fix-setup.py.patch',
-            'TensorFlow-2.18.1_fix-AVX512-eigen-compilation-gcc13.patch',
+            'TensorFlow-2.21.0_remove-libclang-dep.patch',
+            'TensorFlow-2.21.0_relax-flatbuffers-requirement.patch',
         ],
         'source_tmpl': 'v%(version)s.tar.gz',
         'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
@@ -103,7 +88,6 @@ exts_list = [
         'test_targets': [
             '//tensorflow/core/...',
             '-//tensorflow/core:example_java_proto',
-            '-//tensorflow/core/example:example_protos_closure',
             '//tensorflow/cc/...',
             '//tensorflow/c/...',
             '//tensorflow/python/...',
@@ -118,34 +102,24 @@ exts_list = [
             '-//tensorflow/core/kernels/mkl:mkl_fused_batch_norm_op_test',
             '-//tensorflow/core/ir/importexport/tests/roundtrip/...',
         ],
-        'testopts': "--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small ",
+        'testopts': '--test_timeout=3600 --test_size_filters=small ',
         'testopts_gpu': (
-            '--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small '
+            '--test_timeout=3600 --test_size_filters=small '
             '--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute '
         ),
         'with_xla': True,
         'checksums': [
-            {'v2.18.1.tar.gz': '467c512b631e72ad5c9d5c16b23669bcf89675de630cfbb58f9dde746d34afa8'},
-            {'TensorFlow-2.13.0_add-missing-system-protobuf-targets.patch':
-             '77d8c8a5627493fc7c38b4de79d49e60ff6628b05ff969f4cd3ff9857176c459'},
-            {'TensorFlow-2.15.1_fix-flatbuffer-license.patch':
-             '2c04d5095977a628a238dbf93c5fada7159c86752a7183e64e0cf7c7ab00caf4'},
-            {'TensorFlow-2.15.1_fix-pybind11-build.patch':
-             '3bb350ac92ab99c63c951c96b3b0160699f5f16822b64f72111ebfd2275cafce'},
-            {'TensorFlow-2.15.1_add-default-shell-env.patch':
-             '3d5196b4bf2e91048dc8a18f9e8f487a223fcd973d6302e80b0d4000ea3d652b'},
+            {'v2.21.0.tar.gz': 'ef3568bb4865d6c1b2564fb5689c19b6b9a5311572cd1f2ff9198636a8520921'},
             {'TensorFlow-2.4.0_dont-use-var-lock.patch':
              'b14f2493fd2edf79abd1c4f2dde6c98a3e7d5cb9c25ab9386df874d5f072d6b5'},
-            {'TensorFlow-2.18.1_disable-tf32-in-fused-matmul-tests.patch':
-             '97ec29666f3449f2249b121d3c88a374d888732c978c8f2aa74aa5243c7088cc'},
-            {'TensorFlow-2.18.1_fix-patchelf.patch':
-             '6c9a4d8484868b68aad99527420f22ff09528db588cdb11926ec9340f0c4a816'},
+            {'TensorFlow-2.21.0_disable-tf32-in-fused-matmul-tests.patch':
+             '2f605322c9694ccf6e013f06f403496320445a093ceca6625fec616343f5fd32'},
             {'TensorFlow-2.18.1_fix-xnnpack.patch': 'baf81d7b2b61b5a923cf1f171d5e2400df6b8bd9073d3afa7a356e3bbe11984c'},
             {'TensorFlow-2.18.1_fixedpoint.patch': '5ea1eb3b32e7df5f9ae711a71778b4cae544b3380f18882186eea035873fb640'},
-            {'TensorFlow-2.18.1_fix-setup.py.patch':
-             '6a30d61fd47b773d5e3a40ba3d02288df16321ffc45500f91b666437d8ec3343'},
-            {'TensorFlow-2.18.1_fix-AVX512-eigen-compilation-gcc13.patch':
-             '976d4be56144060f2ac4351db8341c6dd72376b0d871d5fddd986548ad03c873'},
+            {'TensorFlow-2.21.0_remove-libclang-dep.patch':
+             '4ee3773d07991c7f75d6dd4033ccf1bb9b017de478b39b4ffb6563a6bd66b981'},
+            {'TensorFlow-2.21.0_relax-flatbuffers-requirement.patch':
+             'c500796a1fe1f3de8322b1a1abeefbd3714fb255e6600d65e3815e20484c45ee'},
         ],
     }),
 ]
Diff against TensorFlow-2.15.1-foss-2023b.eb

easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.15.1-foss-2023b.eb

diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.15.1-foss-2023b.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.21.0-foss-2025b.eb
index 612f273ff3..c76d194cf0 100644
--- a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.15.1-foss-2023b.eb
+++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.21.0-foss-2025b.eb
@@ -1,72 +1,62 @@
 easyblock = 'PythonBundle'
 
 name = 'TensorFlow'
-version = '2.15.1'
+version = '2.21.0'
 
 homepage = 'https://www.tensorflow.org/'
 description = "An open-source software library for Machine Intelligence"
 
-toolchain = {'name': 'foss', 'version': '2023b'}
+toolchain = {'name': 'foss', 'version': '2025b'}
 toolchainopts = {'pic': True}
 
 builddependencies = [
-    ('Bazel', '6.3.1'),
+    ('hatchling', '1.27.0'),
+    ('Bazel', '7.7.0', '-Java-21'),
     # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053
-    ('git', '2.42.0'),
-    ('pybind11', '2.11.1'),
+    ('git', '2.50.1'),
     ('UnZip', '6.0'),
+    ('NASM', '2.16.03'),
     # Required to build some of the extensions
-    ('poetry', '1.6.1'),
-    # Protobuf disabled since 2.13.0 easyconfigs:
-    # Compiling with system protobuf don't seem to work, see:
-    # https://github.com/tensorflow/tensorflow/issues/61593
-    # ('protobuf', '24.0'),
+    ('poetry', '2.1.3'),
+    ('Cython', '3.2.4'),
 ]
 
 dependencies = [
-    ('Python', '3.11.5'),
-    ('h5py', '3.11.0'),
-    ('cURL', '8.3.0'),
-    ('dill', '0.3.8'),
-    ('double-conversion', '3.3.0'),
-    ('flatbuffers', '23.5.26'),
-    ('flatbuffers-python', '23.5.26'),
-    ('giflib', '5.2.1'),
-    ('hwloc', '2.9.2'),
-    ('ICU', '74.1'),
-    ('JsonCpp', '1.9.5'),
-    ('libjpeg-turbo', '3.0.1'),
-    ('ml_dtypes', '0.4.0'),
-    ('NASM', '2.16.01'),
-    ('nsync', '1.29.2'),
-    ('SQLite', '3.43.1'),
+    ('Python', '3.13.5'),
+    ('Python-bundle-PyPI', '2025.07'),
+    ('SciPy-bundle', '2025.07'),
+    ('h5py', '3.14.0'),
+    ('dill', '0.4.1'),
+    ('flatbuffers-python', '25.2.10'),
+    ('ml_dtypes', '0.5.3'),
     ('patchelf', '0.18.0'),
-    ('libpng', '1.6.40'),
-    ('snappy', '1.1.10'),
-    ('zlib', '1.2.13'),
-    ('tensorboard', '2.15.1'),
+    ('protobuf-python', '6.31.1'),
+    ('grpcio', '1.81.0'),
+    ('wrapt', '1.17.3'),
+    ('Markdown', '3.8.2'),
+    ('absl-py', '2.3.1'),
+    ('tensorboard', '2.20.0'),
+    ('opt-einsum', '3.4.0'),
+    ('optree', '0.18.0'),
+    ('typing-extensions', '4.14.1'),
 ]
 
-# Dependencies created and updated using findPythonDeps, see:
-# https://docs.easybuild.io/api/easybuild/scripts/findPythonDeps
-# Notable changes since 2.13.0-foss-2023a
-# - tensoboard-wit deprecated as of tensorboard 2.13.0 (tensorboard@33abcb54d7)
-# - portpicker for tests no longer needed (TF@e85860e838)
-# - opt_einsum now comes from ml_dtypes
 exts_list = [
-    ('wrapt', '1.14.1', {
-        'checksums': ['380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d'],
+    ('astor', '0.8.1', {
+        'checksums': ['6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e'],
+    }),
+    ('termcolor', '2.5.0', {
+        'checksums': ['998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f'],
     }),
-    ('termcolor', '2.3.0', {
-        'checksums': ['b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a'],
+    ('Werkzeug', '3.1.3', {
+        'source_tmpl': '%(namelower)s-%(version)s.tar.gz',
+        'checksums': ['60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746'],
     }),
-    ('tensorflow-estimator', '2.15.0', {
-        'source_tmpl': 'tensorflow_estimator-%(version)s-py2.py3-none-any.whl',
-        'checksums': ['aedf21eec7fb2dc91150fc91a1ce12bc44dbb72278a08b58e79ff87c9e28f153'],
+    ('namex', '0.0.8', {
+        'checksums': ['32a50f6c565c0bb10aa76298c959507abdc0e850efe085dc38f3440fcb3aa90b'],
     }),
-    ('keras', '2.15.0', {
-        'source_tmpl': '%(name)s-%(version)s-py3-none-any.whl',
-        'checksums': ['2dcc6d2e30cf9c951064b63c1f4c404b966c59caf09e01f3549138ec8ee0dd1f'],
+    ('keras', '3.13.2', {
+        'checksums': ['62f0123488ac87c929c988617e14f293f7bc993811837d08bb37eff77adc85a9'],
     }),
     ('google-pasta', '0.2.0', {
         'modulename': 'pasta',
@@ -78,32 +68,26 @@ exts_list = [
     ('tblib', '3.0.0', {
         'checksums': ['93622790a0a29e04f0346458face1e144dc4d32f493714c6c3dff82a4adb77e6'],
     }),
-    ('astor', '0.8.1', {
-        'checksums': ['6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e'],
-    }),
     (name, version, {
         'patches': [
-            'TensorFlow-2.13.0_add-missing-system-protobuf-targets.patch',
-            'TensorFlow-2.15.1_remove-libclang-dep.patch',
-            'TensorFlow-2.15.1_remove-io-gcs-filesystem-dep.patch',
-            'TensorFlow-2.15.1_add-default-shell-env.patch',
-            'TensorFlow-2.15.1_fix-flatbuffer-license.patch',
-            'TensorFlow-2.15.1_fix-pybind11-build.patch',
-            'TensorFlow-2.15.1_fix-AVX512-eigen-compilation.patch',
-            'TensorFlow-2.15.1_fix-AVX512-eigen-compilation-gcc13.patch',
-            'TensorFlow-2.15.1_upgrade-ml_dtypes-dependency-version.patch',
-            'TensorFlow-2.15.1_disable-avx512-extensions.patch',
+            'TensorFlow-2.4.0_dont-use-var-lock.patch',
+            'TensorFlow-2.21.0_disable-tf32-in-fused-matmul-tests.patch',
+            'TensorFlow-2.18.1_fix-xnnpack.patch',
+            'TensorFlow-2.18.1_fixedpoint.patch',
+            'TensorFlow-2.21.0_remove-libclang-dep.patch',
+            'TensorFlow-2.21.0_relax-flatbuffers-requirement.patch',
         ],
         'source_tmpl': 'v%(version)s.tar.gz',
         'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
         'test_script': 'TensorFlow-2.x_mnist-test.py',
         'test_tag_filters_cpu': '-gpu,-tpu,-no_cuda_on_cpu_tap,-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only',
-        'test_tag_filters_gpu': ('gpu,-no_gpu,-nogpu,-gpu_cupti,-no_cuda11,'
-                                 '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only'),
+        'test_tag_filters_gpu': (
+            'gpu,-no_gpu,-nogpu,-gpu_cupti,-no_cuda11,'
+            '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only'
+        ),
         'test_targets': [
             '//tensorflow/core/...',
             '-//tensorflow/core:example_java_proto',
-            '-//tensorflow/core/example:example_protos_closure',
             '//tensorflow/cc/...',
             '//tensorflow/c/...',
             '//tensorflow/python/...',
@@ -118,32 +102,24 @@ exts_list = [
             '-//tensorflow/core/kernels/mkl:mkl_fused_batch_norm_op_test',
             '-//tensorflow/core/ir/importexport/tests/roundtrip/...',
         ],
-        'testopts': "--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small ",
-        'testopts_gpu': ('--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small '
-                         '--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute '),
+        'testopts': '--test_timeout=3600 --test_size_filters=small ',
+        'testopts_gpu': (
+            '--test_timeout=3600 --test_size_filters=small '
+            '--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute '
+        ),
         'with_xla': True,
         'checksums': [
-            {'v2.15.1.tar.gz': 'f36416d831f06fe866e149c7cd752da410a11178b01ff5620e9f265511ed57cf'},
-            {'TensorFlow-2.13.0_add-missing-system-protobuf-targets.patch':
-             '77d8c8a5627493fc7c38b4de79d49e60ff6628b05ff969f4cd3ff9857176c459'},
-            {'TensorFlow-2.15.1_remove-libclang-dep.patch':
-             '871b2f0221b7a150ac9f563ffad7187e052a7eedd95c20fb4524987d7edb6f21'},
-            {'TensorFlow-2.15.1_remove-io-gcs-filesystem-dep.patch':
-             'eba7351a4b0696c589b9c507bacb0257ebce8c39fde39ab72d5d6a69deaaec02'},
-            {'TensorFlow-2.15.1_add-default-shell-env.patch':
-             '3d5196b4bf2e91048dc8a18f9e8f487a223fcd973d6302e80b0d4000ea3d652b'},
-            {'TensorFlow-2.15.1_fix-flatbuffer-license.patch':
-             '2c04d5095977a628a238dbf93c5fada7159c86752a7183e64e0cf7c7ab00caf4'},
-            {'TensorFlow-2.15.1_fix-pybind11-build.patch':
-             '3bb350ac92ab99c63c951c96b3b0160699f5f16822b64f72111ebfd2275cafce'},
-            {'TensorFlow-2.15.1_fix-AVX512-eigen-compilation.patch':
-             '761059e5f5f5eeeef8aed5517a7685a0eb0a9193d4afe8d45237527681c9c0a3'},
-            {'TensorFlow-2.15.1_fix-AVX512-eigen-compilation-gcc13.patch':
-             '68adc4bb726a60f2deed2d746d305960505c5cd3abbc018bad1074d95e2a3853'},
-            {'TensorFlow-2.15.1_upgrade-ml_dtypes-dependency-version.patch':
-             'da4a8e63251a7f6aca38a55f8d4ee2955278c320bd20158a78dabd4decb8c9f0'},
-            {'TensorFlow-2.15.1_disable-avx512-extensions.patch':
-             '506ceecff67237eed9cd9e9e114bc1461f35a343f77f83cb3dab710aa701dc0f'},
+            {'v2.21.0.tar.gz': 'ef3568bb4865d6c1b2564fb5689c19b6b9a5311572cd1f2ff9198636a8520921'},
+            {'TensorFlow-2.4.0_dont-use-var-lock.patch':
+             'b14f2493fd2edf79abd1c4f2dde6c98a3e7d5cb9c25ab9386df874d5f072d6b5'},
+            {'TensorFlow-2.21.0_disable-tf32-in-fused-matmul-tests.patch':
+             '2f605322c9694ccf6e013f06f403496320445a093ceca6625fec616343f5fd32'},
+            {'TensorFlow-2.18.1_fix-xnnpack.patch': 'baf81d7b2b61b5a923cf1f171d5e2400df6b8bd9073d3afa7a356e3bbe11984c'},
+            {'TensorFlow-2.18.1_fixedpoint.patch': '5ea1eb3b32e7df5f9ae711a71778b4cae544b3380f18882186eea035873fb640'},
+            {'TensorFlow-2.21.0_remove-libclang-dep.patch':
+             '4ee3773d07991c7f75d6dd4033ccf1bb9b017de478b39b4ffb6563a6bd66b981'},
+            {'TensorFlow-2.21.0_relax-flatbuffers-requirement.patch':
+             'c500796a1fe1f3de8322b1a1abeefbd3714fb255e6600d65e3815e20484c45ee'},
         ],
     }),
 ]

Comment on lines +105 to +122
'buildopts': '--action_env=CPATH= --host_action_env=CPATH=',
'testopts': (
'--action_env=CPATH= --host_action_env=CPATH= '
'--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small '
),
'testopts_gpu': (
'--action_env=CPATH= --host_action_env=CPATH= '
'--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small '
'--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute '
),
# EasyBuild 5.3.0's TF_SYSTEM_LIBS mapping is incompatible with TensorFlow 2.21 for these entries:
# absl_py has no usable system repository, while boringssl is auto-enabled whenever OpenSSL is loaded.
# Run Bazel in batch mode to avoid Netty server startup crashes on filesystems without robust locking.
# CPATH is cleared for Bazel actions so installed headers cannot shadow vendored repository headers.
'prebuildopts': (
"printf 'startup --batch\\n' >> .bazelrc && "
"sed -i 's/absl_py,//; s/,absl_py//; s/boringssl,//; s/,boringssl//' .tf_configure.bazelrc && "
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some stuff in this block looks like it really belong on the TensorFlow easyblock...

@Flamefire thoughts on this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely. The comment says the easyblock does something wrong, so that should be fixed in the easyblock

absl_py has no usable system repository

What does this mean exactly? It is mentioned at least: https://github.com/tensorflow/tensorflow/blob/651b8e62e7810de374ddb3f3c983ff9140aa260f/third_party/systemlibs/syslibs_configure.bzl#L12

while boringssl is auto-enabled whenever OpenSSL is loaded.

This is correct and intentional. Looks like you are disabling it here. Why? You cannot mix OpenSSL and BoringSSL IIRC

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I originally had these changes to get past certain build errors, but this might not be needed anymore. Let me retest without these absl_py and BoringSSL changes, in case I will post here the problem, or make a PR at easyblocks

]

postinstallcmds = [
'mkdir -p %(installdir)s/bin && ln -sf "$EBROOTTENSORBOARD/bin/tensorboard" %(installdir)s/bin/tensorboard',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bedroesb Any particular reason for this?

If tensorboard is a dependency, then the command will already be available when this TensorFlow module is loaded, I don't really see the point of doing this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an error related to this, but let me retry without, many things have changed

@boegel boegel added this to the 5.x milestone Aug 5, 2026
@boegel

boegel commented Aug 5, 2026

Copy link
Copy Markdown
Member

@boegelbot please test @ jsc-zen3
CORE_CNT=16

@boegelbot

Copy link
Copy Markdown
Collaborator

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=26602 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_26602 --ntasks="16" ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 11104

Test results coming soon (I hope)...

Details

- notification for comment with ID 5195244561 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot

Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (total: 2 hours 32 mins 57 secs) (1 easyconfigs in total)
jsczen3c3.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.8, x86_64, AMD EPYC-Milan Processor (zen3), Python 3.9.25
See https://gist.github.com/boegelbot/2f301203a30f9f95d058755d8e66bc64 for a full test report.

'-//tensorflow/core/kernels/mkl:mkl_fused_batch_norm_op_test',
'-//tensorflow/core/ir/importexport/tests/roundtrip/...',
],
'buildopts': '--action_env=CPATH= --host_action_env=CPATH=',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resetting CPATH all over the place looks wrong. Why is that done?

'buildopts': '--action_env=CPATH= --host_action_env=CPATH=',
'testopts': (
'--action_env=CPATH= --host_action_env=CPATH= '
'--test_env=HOME=/tmp --test_timeout=3600 --test_size_filters=small '

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOME could be included to be set in the easyblock if not done yet

@bedroesb bedroesb changed the title {TensorFlow}[foss/2025b] TensorFlow v2.21.0 {lib}[foss/2025b] TensorFlow v2.21.0 Aug 6, 2026
@bedroesb

bedroesb commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@boegel and @Flamefire Making this recipe was a lot harder then bumping some versions or listing some python dependencies (how I did my previous recipes). I had to crawl through one compilation error after another, and had to use LLMs to make sense of it. Off course this means that the delivered recipe is beyond my own understanding. I did this time include the errors in the PR I try to solve with the changes: easybuilders/easybuild-easyblocks#4193.

I understand that this is not ideal and I am grateful for your time! Honest question, what is the least time consuming for the team, requesting a module in the issues, or trying to make one like I did here? I off course make sure all tests complete and it compiles :)

@Flamefire

Copy link
Copy Markdown
Contributor

I'm aware that TensorFlow with Bazel is a beast, congrats for making it so far, this is no small feat!

Honest question, what is the least time consuming for the team, requesting a module in the issues, or trying to make one like I did here?

Personally you did the right thing. This allows to look exactly at the errors and changes you've seen and done already. There is a good chance that this is enough already or only small adjustments are required, like moving the test option to the easyblock to avoid copying it to all easyconfigs.
So don't let the discussion discourage you, especially when it is for such a complex build system.

@bedroesb

bedroesb commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

locally, with the newly cleaned up easyblock changes, I got a

== Build succeeded for 1 out of 1 (total: 2 hours 1 min 2 secs)
== Summary:
   * [SUCCESS] TensorFlow/2.21.0-foss-2025b

Don't know how this PR picks up these changes in my other pulls request, but in case, they should work together :)

@Flamefire

Copy link
Copy Markdown
Contributor

@bedroesb I tested the compilation on 2 of our machines and there were multiple patches required due to major changes in 2.19 and especially 2.2. Instead of commenting them here I created #26658 with yours and mine included for testing

@bedroesb

Copy link
Copy Markdown
Contributor Author

Hey! Thank you for the investigation! Do you think my commits can be preserved? You can also commit straight onto my Pull request if you want off course! Some of the changes I also used to have but I cleaned them up again afterwords. I wonder how it comes that my latest version in combination with the easyblock did compile fine 🤔

@Flamefire

Copy link
Copy Markdown
Contributor

Hey! Thank you for the investigation! Do you think my commits can be preserved? You can also commit straight onto my Pull request if you want off course!

Sure! I cannot add directly but I can open a PR to your repo branch.
Can you sync your branch with origin develop? Yours is currently 508 commits behind which shows too many changes. You can open https://github.com/bedroesb/easybuild-easyconfigs/tree/TensorFlow and click the button "sync with..." which is likely easiest

Some of the changes I also used to have but I cleaned them up again afterwords.

Which ones?

I wonder how it comes that my latest version in combination with the easyblock did compile fine 🤔

Possibly because your easyblock effectively removed all systemlibs, especially as cURL isn't included. And it was then using their own toolchain (downloaded clang) instead of our compilers and rpath wrappers

Will be on vacation so it will take a bit of time, feel free to check and comment on my PRs.
I only wanted to make sure I upload my work before leaving after I got it to build manually. But seems there are still some issues to solve, but I guess it's almost done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2025b issues & PRs related to 2025b common toolchains update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants