py-tensorflow: Update for use with Fujitsu compiler (#17088)

* py-tensorflow: Update for use with Fujitsu compiler

* py-tensorflow: remove -march option

* fix flake8 error
This commit is contained in:
takanori-ihara 2020-06-17 22:00:36 +09:00 committed by GitHub
parent dc0dfe9220
commit eb5f1886b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 740f24ec4a..7b8300f678 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -1604,6 +1604,7 @@ def _py_wrap_cc_impl(ctx):
outputs = outputs,
mnemonic = "PythonSwig",
progress_message = "SWIGing " + src.path,
+ use_default_shell_env = True,
)
return struct(files = depset(outputs))

View File

@ -255,6 +255,10 @@ class PyTensorflow(Package, CudaPackage):
# Allows 2.0.* releases to build with '--config=nogcp' # Allows 2.0.* releases to build with '--config=nogcp'
patch('0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch', patch('0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch',
when='@2.0.0:2.0.1') when='@2.0.0:2.0.1')
# for fcc
patch('1-1_fcc_tf_patch.patch', when='@2.1.0:2.1.99%fj')
# do not import contrib.cloud if not available # do not import contrib.cloud if not available
patch('https://github.com/tensorflow/tensorflow/commit/ed62ac8203999513dfae03498e871ea35eb60cc4.patch', patch('https://github.com/tensorflow/tensorflow/commit/ed62ac8203999513dfae03498e871ea35eb60cc4.patch',
sha256='c37d14622a86b164e2411ea45a04f756ac61b2044d251f19ab17733c508e5305', when='@1.14.0') sha256='c37d14622a86b164e2411ea45a04f756ac61b2044d251f19ab17733c508e5305', when='@1.14.0')
@ -635,6 +639,11 @@ def post_configure_fixes(self):
'build --action_env LD_LIBRARY_PATH="' + slibs + '"', 'build --action_env LD_LIBRARY_PATH="' + slibs + '"',
'.tf_configure.bazelrc') '.tf_configure.bazelrc')
filter_file('build:opt --copt=-march=native', '',
'.tf_configure.bazelrc')
filter_file('build:opt --host_copt=-march=native', '',
'.tf_configure.bazelrc')
def build(self, spec, prefix): def build(self, spec, prefix):
tmp_path = env['TEST_TMPDIR'] tmp_path = env['TEST_TMPDIR']