diff options
author | 2017-11-06 09:37:03 -0800 | |
---|---|---|
committer | 2017-11-06 09:40:35 -0800 | |
commit | c9885ea7a73ade2d3f8e4712c3a14d9da72462b8 (patch) | |
tree | 6c671fcd8c2175d1ed32536dc21f9fb3216d3877 /configure.py | |
parent | 3d590ada31123cbf670d2ad9afdf027eb6ec0d64 (diff) |
Fix generate_examples build
- Add -march=native to host_copts and host_cxxopts in configure.py
- Make string.h for abstracting string differences at core interpreter level
- Use tensorflow special arg parse instead of flags
- Switch to using tool instead of data for dependency
- Fix python3 compatibility
+ Use six.StringIO instead of StringIO.StringIO
+ Use print_function
+ Properly set binary flags on TempFile's used in toco_convert
- Misc other path fixes
PiperOrigin-RevId: 174717673
Diffstat (limited to 'configure.py')
-rw-r--r-- | configure.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.py b/configure.py index bc7859fee4..650541770a 100644 --- a/configure.py +++ b/configure.py @@ -25,10 +25,12 @@ import re import subprocess import sys +# pylint: disable=g-import-not-at-top try: from shutil import which except ImportError: from distutils.spawn import find_executable as which +# pylint: enable=g-import-not-at-top _TF_BAZELRC = os.path.join(os.path.dirname(os.path.abspath(__file__)), '.tf_configure.bazelrc') @@ -485,7 +487,10 @@ def set_cc_opt_flags(environ_cp): cc_opt_flags = get_from_env_or_user_or_default(environ_cp, 'CC_OPT_FLAGS', question, default_cc_opt_flags) for opt in cc_opt_flags.split(): - write_to_bazelrc('build:opt --cxxopt=%s --copt=%s' % (opt, opt)) + host_opt = '-march=native' # It should be safe on the same build host. + write_to_bazelrc( + 'build:opt --cxxopt=%s --copt=%s' % (opt, opt) + + ' --host_cxxopt=%s --host_copt=%s' % (host_opt, host_opt)) def set_tf_cuda_clang(environ_cp): |