diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0-foss-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0-foss-2019b-Python-3.7.4.eb new file mode 100644 index 00000000000..7127b094f76 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0-foss-2019b-Python-3.7.4.eb @@ -0,0 +1,173 @@ +easyblock = 'PythonBundle' + +name = 'TensorFlow' +version = '2.3.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://www.tensorflow.org/' +description = "An open-source software library for Machine Intelligence" + +toolchain = {'name': 'foss', 'version': '2019b'} +toolchainopts = {'usempi': True, 'pic': True} + +builddependencies = [ + ('Bazel', '3.4.1'), + ('protobuf', '3.10.0'), + # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053 + ('git', '2.23.0', '-nodocs'), + ('pybind11', '2.4.3', versionsuffix), +] +dependencies = [ + ('Python', '3.7.4'), + ('h5py', '2.10.0', versionsuffix), + ('cURL', '7.66.0'), + ('double-conversion', '3.1.4'), + ('flatbuffers', '1.12.0'), + ('giflib', '5.2.1'), + ('hwloc', '1.11.12'), + ('ICU', '64.2'), + ('JsonCpp', '1.9.3'), + ('libjpeg-turbo', '2.0.3'), + ('LMDB', '0.9.24'), + ('NASM', '2.14.02'), + ('nsync', '1.24.0'), + ('SQLite', '3.29.0'), + ('PCRE', '8.43'), + ('protobuf-python', '3.10.0', versionsuffix), + ('libpng', '1.6.37'), + ('snappy', '1.1.7'), + ('SWIG', '4.0.1'), + ('zlib', '1.2.11'), + # TF 2.3 requires SciPy 1.4.1 due to potential crashes with other versions + # See https://github.com/tensorflow/tensorflow/commit/54daf3c5700897a6062313983933ca28e92c410d + # Add at bottom so it will be loaded after any dependency loading the SciPy-Bundle + ('scipy', '1.4.1', versionsuffix), +] + +exts_default_options = { + 'source_urls': [PYPI_SOURCE], + 'sanity_pip_check': True, +} +use_pip = True + +# Dependencies created and updated using findPythonDeps.sh: +# https://gist.github.com/Flamefire/49426e502cd8983757bd01a08a10ae0d +exts_list = [ + ('Markdown', '3.2.2', { + 'checksums': ['1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17'], + }), + ('pyasn1-modules', '0.2.8', { + 'checksums': ['905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e'], + }), + ('rsa', '4.6', { + 'checksums': ['109ea5a66744dd859bf16fe904b8d8b627adafb9408753161e766a92e7d681fa'], + }), + ('cachetools', '4.1.1', { + 'checksums': ['bbaa39c3dede00175df2dc2b03d0cf18dd2d32a7de7beb68072d13043c9edb20'], + }), + ('google-auth', '1.20.0', { + 'modulename': 'google.auth', + 'checksums': ['c6e9735a2ee829a75b546702e460489db5cc35567a27fabd70b7c459f11efd58'], + }), + ('oauthlib', '3.1.0', { + 'checksums': ['bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889'], + }), + ('requests-oauthlib', '1.3.0', { + 'checksums': ['b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a'], + }), + ('google-auth-oauthlib', '0.4.1', { + 'checksums': ['88d2cd115e3391eb85e1243ac6902e76e77c5fe438b7276b297fbe68015458dd'], + }), + ('Werkzeug', '1.0.1', { + 'checksums': ['6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c'], + }), + ('absl-py', '0.9.0', { + 'modulename': 'absl', + 'checksums': ['75e737d6ce7723d9ff9b7aa1ba3233c34be62ef18d5859e706b8fdc828989830'], + }), + ('astunparse', '1.6.3', { + 'checksums': ['5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872'], + }), + ('grpcio', '1.30.0', { + 'modulename': 'grpc', + 'checksums': ['e8f2f5d16e0164c415f1b31a8d9a81f2e4645a43d1b261375d6bab7b0adf511f'], + }), + ('tensorboard-plugin-wit', '1.7.0', { + 'source_tmpl': 'tensorboard_plugin_wit-%(version)s-py3-none-any.whl', + 'unpack_sources': False, + 'checksums': ['ee775f04821185c90d9a0e9c56970ee43d7c41403beb6629385b39517129685b'], + }), + ('tensorboard', version, { + 'source_tmpl': 'tensorboard-%(version)s-py3-none-any.whl', + 'unpack_sources': False, + 'checksums': ['d34609ed83ff01dd5b49ef81031cfc9c166bba0dabd60197024f14df5e8eae5e'], + }), + ('google-pasta', '0.2.0', { + 'modulename': 'pasta', + 'checksums': ['c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e'], + }), + ('termcolor', '1.1.0', { + 'checksums': ['1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b'], + }), + ('tensorflow-estimator', version, { + 'source_tmpl': 'tensorflow_estimator-%(version)s-py2.py3-none-any.whl', + 'unpack_sources': False, + 'checksums': ['b75e034300ccb169403cf2695adf3368da68863aeb0c14c3760064c713d5c486'], + }), + ('astor', '0.8.0', { + 'checksums': ['37a6eed8b371f1228db08234ed7f6cfdc7817a3ed3824797e20cbb11dc2a7862'], + }), + ('Keras-Applications', '1.0.8', { + 'source_tmpl': 'Keras_Applications-%(version)s.tar.gz', + 'checksums': ['5579f9a12bcde9748f4a12233925a59b93b73ae6947409ff34aa2ba258189fe5'], + }), + ('gast', '0.3.3', { + 'checksums': ['b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57'], + }), + ('opt-einsum', '3.3.0', { + 'source_tmpl': 'opt_einsum-%(version)s.tar.gz', + 'checksums': ['59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549'], + }), + ('wrapt', '1.12.1', { + 'checksums': ['b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7'], + }), + ('Keras-Preprocessing', '1.1.2', { + 'source_tmpl': 'Keras_Preprocessing-%(version)s.tar.gz', + 'checksums': ['add82567c50c8bc648c14195bf544a5ce7c1f76761536956c3d2978970179ef3'], + }), + (name, version, { + 'patches': [ + 'TensorFlow-2.1.0_fix-cuda-build.patch', + 'TensorFlow-2.1.0_fix-system-nasm.patch', + 'TensorFlow-2.3.0_fix-json-include-style.patch', + 'TensorFlow-2.3.0_fix-system_absl_py.patch', + 'TensorFlow-2.3.0_fix-system-protobuf.patch', + 'TensorFlow-2.3.0_fix-system-protobuf2.patch', + 'TensorFlow-2.3.0_fix-protoc-build.patch', + 'TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch', + ], + 'source_tmpl': 'v%(version)s.tar.gz', + 'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'], + 'test_script': 'TensorFlow-2.x_mnist-test.py', + 'checksums': [ + '2595a5c401521f20a2734c4e5d54120996f8391f00bb62a57267d930bce95350', # v2.3.0.tar.gz + '78c20aeaa7784b8ceb46238a81e8c2461137d28e0b576deeba8357d23fbe1f5a', # TensorFlow-2.1.0_fix-cuda-build.patch + # TensorFlow-2.1.0_fix-system-nasm.patch + '6671e40d60edaf1e57b1861aa3b2178d48f9b7dfb5b5c0d44db541116f848f2a', + # TensorFlow-2.3.0_fix-json-include-style.patch + 'e04f5d9aa4c1222393b2cad4b84cd63128ef56eb5cc732d2afbc5d98dfa596a4', + # TensorFlow-2.3.0_fix-system_absl_py.patch + '04e53b637ca64c4804a4a8d636d75e3c09257034b143b70a33bfee09e6ab4b10', + # TensorFlow-2.3.0_fix-system-protobuf.patch + '4407c3f126eb9d3c1658ef8d6ab3a26e7ed2a40ac869dd194d8a1282f6432c1d', + # TensorFlow-2.3.0_fix-system-protobuf2.patch + '74718e007acb7f5f016848218421895a33e9e894620154482deb75408225577d', + # TensorFlow-2.3.0_fix-protoc-build.patch + '78a8390ea5e06dfcfb25f6434721abbe678e37c4ad7f052aad766c4df399bd53', + # TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch + '1a72f072a764bf66733445ce027c0bad7de7c88092363c0e2a7b91a422608d56', + ], + }), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0-fosscuda-2019b-Python-3.7.4.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0-fosscuda-2019b-Python-3.7.4.eb new file mode 100644 index 00000000000..489d00b8d5e --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0-fosscuda-2019b-Python-3.7.4.eb @@ -0,0 +1,175 @@ +easyblock = 'PythonBundle' + +name = 'TensorFlow' +version = '2.3.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://www.tensorflow.org/' +description = "An open-source software library for Machine Intelligence" + +toolchain = {'name': 'fosscuda', 'version': '2019b'} +toolchainopts = {'usempi': True, 'pic': True} + +builddependencies = [ + ('Bazel', '3.4.1'), + ('protobuf', '3.10.0'), + # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053 + ('git', '2.23.0', '-nodocs'), + ('pybind11', '2.4.3', versionsuffix), +] +dependencies = [ + ('cuDNN', '7.6.4.38'), + ('NCCL', '2.4.8'), + ('Python', '3.7.4'), + ('h5py', '2.10.0', versionsuffix), + ('cURL', '7.66.0'), + ('double-conversion', '3.1.4'), + ('flatbuffers', '1.12.0'), + ('giflib', '5.2.1'), + ('hwloc', '1.11.12'), + ('ICU', '64.2'), + ('JsonCpp', '1.9.3'), + ('libjpeg-turbo', '2.0.3'), + ('LMDB', '0.9.24'), + ('NASM', '2.14.02'), + ('nsync', '1.24.0'), + ('SQLite', '3.29.0'), + ('PCRE', '8.43'), + ('protobuf-python', '3.10.0', versionsuffix), + ('libpng', '1.6.37'), + ('snappy', '1.1.7'), + ('SWIG', '4.0.1'), + ('zlib', '1.2.11'), + # TF 2.3 requires SciPy 1.4.1 due to potential crashes with other versions + # See https://github.com/tensorflow/tensorflow/commit/54daf3c5700897a6062313983933ca28e92c410d + # Add at bottom so it will be loaded after any dependency loading the SciPy-Bundle + ('scipy', '1.4.1', versionsuffix), +] + +exts_default_options = { + 'source_urls': [PYPI_SOURCE], + 'sanity_pip_check': True, +} +use_pip = True + +# Dependencies created and updated using findPythonDeps.sh: +# https://gist.github.com/Flamefire/49426e502cd8983757bd01a08a10ae0d +exts_list = [ + ('Markdown', '3.2.2', { + 'checksums': ['1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17'], + }), + ('pyasn1-modules', '0.2.8', { + 'checksums': ['905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e'], + }), + ('rsa', '4.6', { + 'checksums': ['109ea5a66744dd859bf16fe904b8d8b627adafb9408753161e766a92e7d681fa'], + }), + ('cachetools', '4.1.1', { + 'checksums': ['bbaa39c3dede00175df2dc2b03d0cf18dd2d32a7de7beb68072d13043c9edb20'], + }), + ('google-auth', '1.20.0', { + 'modulename': 'google.auth', + 'checksums': ['c6e9735a2ee829a75b546702e460489db5cc35567a27fabd70b7c459f11efd58'], + }), + ('oauthlib', '3.1.0', { + 'checksums': ['bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889'], + }), + ('requests-oauthlib', '1.3.0', { + 'checksums': ['b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a'], + }), + ('google-auth-oauthlib', '0.4.1', { + 'checksums': ['88d2cd115e3391eb85e1243ac6902e76e77c5fe438b7276b297fbe68015458dd'], + }), + ('Werkzeug', '1.0.1', { + 'checksums': ['6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c'], + }), + ('absl-py', '0.9.0', { + 'modulename': 'absl', + 'checksums': ['75e737d6ce7723d9ff9b7aa1ba3233c34be62ef18d5859e706b8fdc828989830'], + }), + ('astunparse', '1.6.3', { + 'checksums': ['5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872'], + }), + ('grpcio', '1.30.0', { + 'modulename': 'grpc', + 'checksums': ['e8f2f5d16e0164c415f1b31a8d9a81f2e4645a43d1b261375d6bab7b0adf511f'], + }), + ('tensorboard-plugin-wit', '1.7.0', { + 'source_tmpl': 'tensorboard_plugin_wit-%(version)s-py3-none-any.whl', + 'unpack_sources': False, + 'checksums': ['ee775f04821185c90d9a0e9c56970ee43d7c41403beb6629385b39517129685b'], + }), + ('tensorboard', version, { + 'source_tmpl': 'tensorboard-%(version)s-py3-none-any.whl', + 'unpack_sources': False, + 'checksums': ['d34609ed83ff01dd5b49ef81031cfc9c166bba0dabd60197024f14df5e8eae5e'], + }), + ('google-pasta', '0.2.0', { + 'modulename': 'pasta', + 'checksums': ['c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e'], + }), + ('termcolor', '1.1.0', { + 'checksums': ['1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b'], + }), + ('tensorflow-estimator', version, { + 'source_tmpl': 'tensorflow_estimator-%(version)s-py2.py3-none-any.whl', + 'unpack_sources': False, + 'checksums': ['b75e034300ccb169403cf2695adf3368da68863aeb0c14c3760064c713d5c486'], + }), + ('astor', '0.8.0', { + 'checksums': ['37a6eed8b371f1228db08234ed7f6cfdc7817a3ed3824797e20cbb11dc2a7862'], + }), + ('Keras-Applications', '1.0.8', { + 'source_tmpl': 'Keras_Applications-%(version)s.tar.gz', + 'checksums': ['5579f9a12bcde9748f4a12233925a59b93b73ae6947409ff34aa2ba258189fe5'], + }), + ('gast', '0.3.3', { + 'checksums': ['b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57'], + }), + ('opt-einsum', '3.3.0', { + 'source_tmpl': 'opt_einsum-%(version)s.tar.gz', + 'checksums': ['59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549'], + }), + ('wrapt', '1.12.1', { + 'checksums': ['b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7'], + }), + ('Keras-Preprocessing', '1.1.2', { + 'source_tmpl': 'Keras_Preprocessing-%(version)s.tar.gz', + 'checksums': ['add82567c50c8bc648c14195bf544a5ce7c1f76761536956c3d2978970179ef3'], + }), + (name, version, { + 'patches': [ + 'TensorFlow-2.1.0_fix-cuda-build.patch', + 'TensorFlow-2.1.0_fix-system-nasm.patch', + 'TensorFlow-2.3.0_fix-json-include-style.patch', + 'TensorFlow-2.3.0_fix-system_absl_py.patch', + 'TensorFlow-2.3.0_fix-system-protobuf.patch', + 'TensorFlow-2.3.0_fix-system-protobuf2.patch', + 'TensorFlow-2.3.0_fix-protoc-build.patch', + 'TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch', + ], + 'source_tmpl': 'v%(version)s.tar.gz', + 'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'], + 'test_script': 'TensorFlow-2.x_mnist-test.py', + 'checksums': [ + '2595a5c401521f20a2734c4e5d54120996f8391f00bb62a57267d930bce95350', # v2.3.0.tar.gz + '78c20aeaa7784b8ceb46238a81e8c2461137d28e0b576deeba8357d23fbe1f5a', # TensorFlow-2.1.0_fix-cuda-build.patch + # TensorFlow-2.1.0_fix-system-nasm.patch + '6671e40d60edaf1e57b1861aa3b2178d48f9b7dfb5b5c0d44db541116f848f2a', + # TensorFlow-2.3.0_fix-json-include-style.patch + 'e04f5d9aa4c1222393b2cad4b84cd63128ef56eb5cc732d2afbc5d98dfa596a4', + # TensorFlow-2.3.0_fix-system_absl_py.patch + '04e53b637ca64c4804a4a8d636d75e3c09257034b143b70a33bfee09e6ab4b10', + # TensorFlow-2.3.0_fix-system-protobuf.patch + '4407c3f126eb9d3c1658ef8d6ab3a26e7ed2a40ac869dd194d8a1282f6432c1d', + # TensorFlow-2.3.0_fix-system-protobuf2.patch + '74718e007acb7f5f016848218421895a33e9e894620154482deb75408225577d', + # TensorFlow-2.3.0_fix-protoc-build.patch + '78a8390ea5e06dfcfb25f6434721abbe678e37c4ad7f052aad766c4df399bd53', + # TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch + '1a72f072a764bf66733445ce027c0bad7de7c88092363c0e2a7b91a422608d56', + ], + }), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-json-include-style.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-json-include-style.patch new file mode 100644 index 00000000000..8e2429a01fc --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-json-include-style.patch @@ -0,0 +1,137 @@ +From 20a00a0328fe1ad08ef51311b93d72d939c142e7 Mon Sep 17 00:00:00 2001 +From: Alexander Grund +Date: Thu, 20 Aug 2020 16:39:40 +0200 +Subject: [PATCH] Include jsonCPP headers via #include "json/json.h" + +Don't use #include "include/json/json.h" which is unusual and therefore confusing +This allows to remove the header symlinking done for the system lib version + +Closes #42303 +--- + .../core/platform/cloud/gcs_file_system.cc | 2 +- + .../platform/cloud/google_auth_provider.cc | 2 +- + tensorflow/core/platform/cloud/oauth_client.h | 2 +- + .../profiler/convert/trace_events_to_json.cc | 2 +- + .../convert/trace_events_to_json_test.cc | 2 +- + .../core/profiler/internal/tfprof_timeline.h | 2 +- + third_party/systemlibs/jsoncpp.BUILD | 27 ------------------- + 9 files changed, 8 insertions(+), 35 deletions(-) + +diff --git a/tensorflow/core/platform/cloud/gcs_file_system.cc b/tensorflow/core/platform/cloud/gcs_file_system.cc +index f0d2138b379ea..59eb610fc5377 100644 +--- a/tensorflow/core/platform/cloud/gcs_file_system.cc ++++ b/tensorflow/core/platform/cloud/gcs_file_system.cc +@@ -30,7 +30,7 @@ limitations under the License. + #include // for _mktemp + #endif + #include "absl/base/macros.h" +-#include "include/json/json.h" ++#include "json/json.h" + #include "tensorflow/core/lib/gtl/map_util.h" + #include "tensorflow/core/platform/cloud/curl_http_request.h" + #include "tensorflow/core/platform/cloud/file_block_cache.h" +diff --git a/tensorflow/core/platform/cloud/google_auth_provider.cc b/tensorflow/core/platform/cloud/google_auth_provider.cc +index e8546ca022f22..57240fa2494b8 100644 +--- a/tensorflow/core/platform/cloud/google_auth_provider.cc ++++ b/tensorflow/core/platform/cloud/google_auth_provider.cc +@@ -24,7 +24,7 @@ limitations under the License. + #include + + #include "absl/strings/match.h" +-#include "include/json/json.h" ++#include "json/json.h" + #include "tensorflow/core/platform/base64.h" + #include "tensorflow/core/platform/env.h" + #include "tensorflow/core/platform/errors.h" +diff --git a/tensorflow/core/platform/cloud/oauth_client.h b/tensorflow/core/platform/cloud/oauth_client.h +index ed8bf2572535e..97af3ecaf1785 100644 +--- a/tensorflow/core/platform/cloud/oauth_client.h ++++ b/tensorflow/core/platform/cloud/oauth_client.h +@@ -18,7 +18,7 @@ limitations under the License. + + #include + +-#include "include/json/json.h" ++#include "json/json.h" + #include "tensorflow/core/platform/cloud/http_request.h" + #include "tensorflow/core/platform/env.h" + #include "tensorflow/core/platform/status.h" +diff --git a/tensorflow/core/profiler/convert/trace_events_to_json.cc b/tensorflow/core/profiler/convert/trace_events_to_json.cc +index ba3e4516c8cae..ad40292ceffb3 100644 +--- a/tensorflow/core/profiler/convert/trace_events_to_json.cc ++++ b/tensorflow/core/profiler/convert/trace_events_to_json.cc +@@ -21,7 +21,7 @@ limitations under the License. + + #include "absl/strings/str_cat.h" + #include "absl/strings/str_format.h" +-#include "include/json/json.h" ++#include "json/json.h" + #include "tensorflow/core/platform/types.h" + #include "tensorflow/core/profiler/protobuf/trace_events.pb.h" + +diff --git a/tensorflow/core/profiler/convert/trace_events_to_json_test.cc b/tensorflow/core/profiler/convert/trace_events_to_json_test.cc +index dc985f2f76feb..bf08a19e0221e 100644 +--- a/tensorflow/core/profiler/convert/trace_events_to_json_test.cc ++++ b/tensorflow/core/profiler/convert/trace_events_to_json_test.cc +@@ -15,7 +15,7 @@ limitations under the License. + + #include "tensorflow/core/profiler/convert/trace_events_to_json.h" + +-#include "include/json/json.h" ++#include "json/json.h" + #include "tensorflow/core/platform/protobuf.h" + #include "tensorflow/core/platform/test.h" + #include "tensorflow/core/profiler/protobuf/trace_events.pb.h" +diff --git a/tensorflow/core/profiler/internal/tfprof_timeline.h b/tensorflow/core/profiler/internal/tfprof_timeline.h +index 834e3c9be911e..fb9ff8012e06f 100644 +--- a/tensorflow/core/profiler/internal/tfprof_timeline.h ++++ b/tensorflow/core/profiler/internal/tfprof_timeline.h +@@ -17,7 +17,7 @@ limitations under the License. + #define TENSORFLOW_CORE_PROFILER_INTERNAL_TFPROF_TIMELINE_H_ + + #include "absl/strings/str_cat.h" +-#include "include/json/json.h" ++#include "json/json.h" + #include "tensorflow/core/framework/graph.pb.h" + #include "tensorflow/core/framework/step_stats.pb.h" + #include "tensorflow/core/profiler/internal/tfprof_node_show.h" +diff --git a/third_party/systemlibs/jsoncpp.BUILD b/third_party/systemlibs/jsoncpp.BUILD +index 7d54f9289bfc7..b5951e3a3404f 100644 +--- a/third_party/systemlibs/jsoncpp.BUILD ++++ b/third_party/systemlibs/jsoncpp.BUILD +@@ -5,35 +5,8 @@ filegroup( + visibility = ["//visibility:public"], + ) + +-HEADERS = [ +- "include/json/allocator.h", +- "include/json/assertions.h", +- "include/json/autolink.h", +- "include/json/config.h", +- "include/json/features.h", +- "include/json/forwards.h", +- "include/json/json.h", +- "include/json/reader.h", +- "include/json/value.h", +- "include/json/version.h", +- "include/json/writer.h", +-] +- +-genrule( +- name = "link_headers", +- outs = HEADERS, +- cmd = """ +- for i in $(OUTS); do +- i=$${i##*/} +- ln -sf $(INCLUDEDIR)/jsoncpp/json/$$i $(@D)/include/json/$$i +- done +- """, +-) +- + cc_library( + name = "jsoncpp", +- hdrs = HEADERS, +- includes = ["."], + linkopts = ["-ljsoncpp"], + visibility = ["//visibility:public"], + ) diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-protoc-build.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-protoc-build.patch new file mode 100644 index 00000000000..d9c98c14dcb --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-protoc-build.patch @@ -0,0 +1,37 @@ +commit c8231eb55bdbff94c44e4b554321017fbd01bda9 +Author: Alexander Grund +Date: Wed Jul 29 16:57:39 2020 +0200 + + Fix environment for protobuf compilation + + Patch using upstream https://github.com/grpc/grpc/pull/23664 + +https://github.com/tensorflow/tensorflow/pull/41889 +diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl +index 24446d846c..ee63c4a811 100755 +--- a/tensorflow/workspace.bzl ++++ b/tensorflow/workspace.bzl +@@ -687,6 +687,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): + sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", + strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", + system_build_file = clean_dep("//third_party/systemlibs:grpc.BUILD"), ++ patch_file = clean_dep("//third_party/grpc:generate_cc_env_fix.patch"), + system_link_files = { + "//third_party/systemlibs:BUILD": "bazel/BUILD", + "//third_party/systemlibs:grpc.BUILD": "src/compiler/BUILD", +diff --git a/third_party/grpc/generate_cc_env_fix.patch b/third_party/grpc/generate_cc_env_fix.patch +new file mode 100644 +index 0000000000..51832fe962 +--- /dev/null ++++ b/third_party/grpc/generate_cc_env_fix.patch +@@ -0,0 +1,10 @@ ++--- a/bazel/generate_cc.bzl +++++ b/bazel/generate_cc.bzl ++@@ -141,6 +141,7 @@ def generate_cc_impl(ctx): ++ outputs = out_files, ++ executable = ctx.executable._protoc, ++ arguments = arguments, +++ use_default_shell_env = True, ++ ) ++ ++ return struct(files = depset(out_files)) diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system-protobuf.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system-protobuf.patch new file mode 100644 index 00000000000..f7447d6300e --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system-protobuf.patch @@ -0,0 +1,119 @@ +From ab6c3bf9d98d7627509865e91913c25a1f8cc693 Mon Sep 17 00:00:00 2001 +From: Steven Clarkson +Date: Sat, 22 Aug 2020 16:57:25 -0700 +Subject: [PATCH] Add missing systemlib protobuf libraries + +--- + third_party/systemlibs/protobuf.BUILD | 83 +++++++++++++++++++++++++++ + 1 file changed, 83 insertions(+) + +diff --git a/third_party/systemlibs/protobuf.BUILD b/third_party/systemlibs/protobuf.BUILD +index 118135d129005..ef3e0c93c6483 100644 +--- a/third_party/systemlibs/protobuf.BUILD ++++ b/third_party/systemlibs/protobuf.BUILD +@@ -15,8 +15,13 @@ filegroup( + HEADERS = [ + "google/protobuf/any.pb.h", + "google/protobuf/any.proto", ++ "google/protobuf/api.pb.h", ++ "google/protobuf/api.proto", + "google/protobuf/arena.h", + "google/protobuf/compiler/importer.h", ++ "google/protobuf/compiler/plugin.h", ++ "google/protobuf/compiler/plugin.pb.h", ++ "google/protobuf/compiler/plugin.proto", + "google/protobuf/descriptor.h", + "google/protobuf/descriptor.pb.h", + "google/protobuf/descriptor.proto", +@@ -32,9 +37,15 @@ HEADERS = [ + "google/protobuf/io/zero_copy_stream_impl_lite.h", + "google/protobuf/map.h", + "google/protobuf/repeated_field.h", ++ "google/protobuf/source_context.pb.h", ++ "google/protobuf/source_context.proto", ++ "google/protobuf/struct.pb.h", ++ "google/protobuf/struct.proto", + "google/protobuf/text_format.h", + "google/protobuf/timestamp.pb.h", + "google/protobuf/timestamp.proto", ++ "google/protobuf/type.pb.h", ++ "google/protobuf/type.proto", + "google/protobuf/util/json_util.h", + "google/protobuf/util/type_resolver_util.h", + "google/protobuf/wrappers.pb.h", +@@ -102,3 +113,75 @@ py_library( + srcs_version = "PY2AND3", + visibility = ["//visibility:public"], + ) ++ ++proto_library( ++ name = "any_proto", ++ srcs = ["google/protobuf/any.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "api_proto", ++ srcs = ["google/protobuf/api.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "compiler_plugin_proto", ++ srcs = ["google/protobuf/compiler/plugin.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "descriptor_proto", ++ srcs = ["google/protobuf/descriptor.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "duration_proto", ++ srcs = ["google/protobuf/duration.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "empty_proto", ++ srcs = ["google/protobuf/empty.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "field_mask_proto", ++ srcs = ["google/protobuf/field_mask.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "source_context_proto", ++ srcs = ["google/protobuf/source_context.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "struct_proto", ++ srcs = ["google/protobuf/struct.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "timestamp_proto", ++ srcs = ["google/protobuf/timestamp.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "type_proto", ++ srcs = ["google/protobuf/type.proto"], ++ visibility = ["//visibility:public"], ++) ++ ++proto_library( ++ name = "wrappers_proto", ++ srcs = ["google/protobuf/wrappers.proto"], ++ visibility = ["//visibility:public"], ++) diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system-protobuf2.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system-protobuf2.patch new file mode 100644 index 00000000000..4eac729e655 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system-protobuf2.patch @@ -0,0 +1,103 @@ +From 32c2048560940dcc3c475eefdc857bb6202d18e0 Mon Sep 17 00:00:00 2001 +From: Alexander Grund +Date: Fri, 11 Sep 2020 17:14:34 +0200 +Subject: [PATCH] Do not symlink system protobuf headers but only required + .proto files + +Symlinking the system headers has proven to be problematic as newer +versions of protobuf add or remove headers which makes having a static +array of header files hard to impossible. Turns out the headers don't +need to be symlinked at all but only the .proto files used as inputs +need to be present. +--- + third_party/systemlibs/protobuf.BUILD | 35 +++------------------------ + 1 file changed, 3 insertions(+), 32 deletions(-) + +diff --git a/third_party/systemlibs/protobuf.BUILD b/third_party/systemlibs/protobuf.BUILD +index ef3e0c93c6483..ccf2ab4dc7d8b 100644 +--- a/third_party/systemlibs/protobuf.BUILD ++++ b/third_party/systemlibs/protobuf.BUILD +@@ -12,49 +12,24 @@ filegroup( + visibility = ["//visibility:public"], + ) + +-HEADERS = [ +- "google/protobuf/any.pb.h", ++PROTO_FILES = [ + "google/protobuf/any.proto", +- "google/protobuf/api.pb.h", + "google/protobuf/api.proto", +- "google/protobuf/arena.h", +- "google/protobuf/compiler/importer.h", +- "google/protobuf/compiler/plugin.h", +- "google/protobuf/compiler/plugin.pb.h", + "google/protobuf/compiler/plugin.proto", +- "google/protobuf/descriptor.h", +- "google/protobuf/descriptor.pb.h", + "google/protobuf/descriptor.proto", +- "google/protobuf/duration.pb.h", + "google/protobuf/duration.proto", +- "google/protobuf/dynamic_message.h", +- "google/protobuf/empty.pb.h", + "google/protobuf/empty.proto", +- "google/protobuf/field_mask.pb.h", + "google/protobuf/field_mask.proto", +- "google/protobuf/io/coded_stream.h", +- "google/protobuf/io/zero_copy_stream.h", +- "google/protobuf/io/zero_copy_stream_impl_lite.h", +- "google/protobuf/map.h", +- "google/protobuf/repeated_field.h", +- "google/protobuf/source_context.pb.h", + "google/protobuf/source_context.proto", +- "google/protobuf/struct.pb.h", + "google/protobuf/struct.proto", +- "google/protobuf/text_format.h", +- "google/protobuf/timestamp.pb.h", + "google/protobuf/timestamp.proto", +- "google/protobuf/type.pb.h", + "google/protobuf/type.proto", +- "google/protobuf/util/json_util.h", +- "google/protobuf/util/type_resolver_util.h", +- "google/protobuf/wrappers.pb.h", + "google/protobuf/wrappers.proto", + ] + + genrule( +- name = "link_headers", +- outs = HEADERS, ++ name = "link_proto_files", ++ outs = PROTO_FILES, + cmd = """ + for i in $(OUTS); do + f=$${i#$(@D)/} +@@ -66,14 +41,12 @@ genrule( + + cc_library( + name = "protobuf", +- hdrs = HEADERS, + linkopts = ["-lprotobuf"], + visibility = ["//visibility:public"], + ) + + cc_library( + name = "protobuf_headers", +- hdrs = HEADERS, + linkopts = ["-lprotobuf"], + visibility = ["//visibility:public"], + ) +@@ -94,7 +67,6 @@ genrule( + + cc_proto_library( + name = "cc_wkt_protos", +- hdrs = HEADERS, + internal_bootstrap_hack = 1, + protoc = ":protoc", + visibility = ["//visibility:public"], +@@ -109,7 +81,6 @@ proto_gen( + + py_library( + name = "protobuf_python", +- data = [":link_headers"], + srcs_version = "PY2AND3", + visibility = ["//visibility:public"], + ) diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system_absl_py.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system_absl_py.patch new file mode 100644 index 00000000000..abe1835f0ba --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_fix-system_absl_py.patch @@ -0,0 +1,55 @@ +From fda56a4c619d093108cd2778e74073d65fb0e407 Mon Sep 17 00:00:00 2001 +From: Balint Cristian +Date: Wed, 24 Jun 2020 12:10:23 +0300 +Subject: [PATCH] [EXT-SYSLIB] Add absl_py logging submodule to build flow. + +From https://github.com/tensorflow/tensorflow/pull/40749 + +--- + tensorflow/opensource_only.files | 1 + + tensorflow/workspace.bzl | 1 + + third_party/systemlibs/absl_py.absl.logging.BUILD | 11 +++++++++++ + 3 files changed, 13 insertions(+) + create mode 100644 third_party/systemlibs/absl_py.absl.logging.BUILD + +diff --git a/tensorflow/opensource_only.files b/tensorflow/opensource_only.files +index 3d57e5f2089c5..cddf018bb21f7 100644 +--- a/tensorflow/opensource_only.files ++++ b/tensorflow/opensource_only.files +@@ -170,6 +170,7 @@ tensorflow/third_party/systemlibs/BUILD.tpl + tensorflow/third_party/systemlibs/absl_py.BUILD + tensorflow/third_party/systemlibs/absl_py.absl.flags.BUILD + tensorflow/third_party/systemlibs/absl_py.absl.testing.BUILD ++tensorflow/third_party/systemlibs/absl_py.absl.logging.BUILD + tensorflow/third_party/systemlibs/astor.BUILD + tensorflow/third_party/systemlibs/boringssl.BUILD + tensorflow/third_party/systemlibs/build_defs.bzl.tpl +diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl +index f2d0c028c5fa7..d142910619c09 100755 +--- a/tensorflow/workspace.bzl ++++ b/tensorflow/workspace.bzl +@@ -535,6 +535,7 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): + "//third_party/systemlibs:absl_py.absl.BUILD": "absl/BUILD", + "//third_party/systemlibs:absl_py.absl.flags.BUILD": "absl/flags/BUILD", + "//third_party/systemlibs:absl_py.absl.testing.BUILD": "absl/testing/BUILD", ++ "//third_party/systemlibs:absl_py.absl.logging.BUILD": "absl/logging/BUILD", + }, + urls = [ + "https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-py/archive/pypi-v0.9.0.tar.gz", +diff --git a/third_party/systemlibs/absl_py.absl.logging.BUILD b/third_party/systemlibs/absl_py.absl.logging.BUILD +new file mode 100644 +index 0000000000000..71cfc7a247c8a +--- /dev/null ++++ b/third_party/systemlibs/absl_py.absl.logging.BUILD +@@ -0,0 +1,11 @@ ++licenses(["notice"]) # Apache 2.0 ++ ++package(default_visibility = ["//visibility:public"]) ++ ++filegroup( ++ name = "LICENSE", ++) ++ ++py_library( ++ name = "logging", ++) diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch new file mode 100644 index 00000000000..0791910e124 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.3.0_revert-tools-to-exectools-renaming.patch @@ -0,0 +1,56 @@ +This reverts the following commit. That change caused action_env variables to not be +passed through breaking build using system dependencies. +Author: Alexander Grund (TU Dresden) + +From f827c023906e7d30f0e5f2992b111ab34153310a Mon Sep 17 00:00:00 2001 +From: "A. Unique TensorFlower" +Date: Wed, 4 Mar 2020 22:27:03 -0800 +Subject: [PATCH] Use `exec_tools` rather than `tools` in tensorflow.bzl to + allow transitive dependencies to use python3 tools and deps in genrules + +PiperOrigin-RevId: 299023196 +Change-Id: I99981272330b060e9581c5c2a2f3992d524ae287 +--- + tensorflow/tensorflow.bzl | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl +index b77b923cd4d4e..e4b3fa9ae90e5 100644 +--- a/tensorflow/tensorflow.bzl ++++ b/tensorflow/tensorflow.bzl +@@ -767,7 +767,7 @@ def tf_gen_op_wrapper_cc( + out_ops_file + "_internal.cc", + ], + srcs = srcs, +- exec_tools = [":" + tool] + tf_binary_additional_srcs(), ++ tools = [":" + tool] + tf_binary_additional_srcs(), + cmd = ("$(location :" + tool + ") $(location :" + out_ops_file + ".h) " + + "$(location :" + out_ops_file + ".cc) " + + str(include_internal_ops) + " " + api_def_args_str), +@@ -969,7 +969,7 @@ def tf_gen_op_wrapper_py( + name = name + "_pygenrule", + outs = [out], + srcs = api_def_srcs + [hidden_file], +- exec_tools = [tool_name] + tf_binary_additional_srcs(), ++ tools = [tool_name] + tf_binary_additional_srcs(), + cmd = ("$(location " + tool_name + ") " + api_def_args_str + + " @$(location " + hidden_file + ") > $@"), + ) +@@ -978,7 +978,7 @@ def tf_gen_op_wrapper_py( + name = name + "_pygenrule", + outs = [out], + srcs = api_def_srcs, +- exec_tools = [tool_name] + tf_binary_additional_srcs(), ++ tools = [tool_name] + tf_binary_additional_srcs(), + cmd = ("$(location " + tool_name + ") " + api_def_args_str + " " + + op_list_arg + " " + + ("1" if op_list_is_whitelist else "0") + " > $@"), +@@ -2430,7 +2430,7 @@ def tf_generate_proto_text_sources(name, srcs_relative_dir, srcs, protodeps = [] + cmd = + "$(location //tensorflow/tools/proto_text:gen_proto_text_functions) " + + "$(@D) " + srcs_relative_dir + " $(SRCS)", +- exec_tools = [ ++ tools = [ + clean_dep("//tensorflow/tools/proto_text:gen_proto_text_functions"), + ], + )