Lines Matching +full:1 +full:- +full:installer +full:- +full:darwin +full:- +full:x86_64
7 # http://www.apache.org/licenses/LICENSE-2.0
29 # pylint: disable=g-import-not-at-top
34 # pylint: enable=g-import-not-at-top
56 'lib64/', 'lib/powerpc64le-linux-gnu/', 'lib/x86_64-linux-gnu/', ''
66 _DEFAULT_TENSORRT_PATH_LINUX = '/usr/lib/powerpc64le-linux-gnu/'
68 _DEFAULT_TENSORRT_PATH_LINUX = '/usr/lib/%s-linux-gnu' % platform.machine()
84 return platform.system() == 'Darwin'
100 answer = input(question) # pylint: disable=bad-builtin
107 """Force symlink, equivalent of 'ln -sf'.
144 write_to_bazelrc('build --action_env %s="%s"' % (var_name, str(var)))
155 return output.decode('UTF-8').strip()
170 python_bin_path, '-c',
176 python_bin_path, '-c',
193 return run_shell([python_bin_path, '-c', 'import sys; print(sys.version[0])'])
223 if environ_cp.get('USE_DEFAULT_PYTHON_LIB_PATH') == '1':
242 # Set-up env variables used by python_configure.bzl
245 write_to_bazelrc('build --python_path=\"%s"' % python_bin_path)
330 true_strings = ('1', 't', 'true', 'y', 'yes')
383 bazel_config_name: Name for Bazel --config argument to enable build feature.
388 if var == '1':
390 'build:%s --define %s=true' % (bazel_config_name, option_name))
391 write_to_bazelrc('build --config=%s' % bazel_config_name)
393 # TODO(mikecase): Migrate all users of configure.py to use --config Bazel
396 'build:%s --define %s=true' % (bazel_config_name, option_name))
432 Version strings of the form X.YZ and X.Y.Z-xxxxx are supported. The
441 version = version.split('-')[0]
465 ['bazel', '--batch', '--bazelrc=/dev/null', 'version'])
469 curr_version = line.split('Build label: ')[1]
487 sys.exit(1)
491 'build TensorFlow! To downgrade: download the installer for the old '
493 'run the installer.' % max_version)
494 sys.exit(1)
499 """Set up architecture-dependent optimization flags.
507 # gcc on ppc64le does not support -march, use mcpu instead
508 default_cc_opt_flags = '-mcpu=native'
512 default_cc_opt_flags = '-march=native -Wno-sign-compare'
514 ' bazel option "--config=opt" is specified [Default is %s]: '
519 write_to_bazelrc('build:opt --copt=%s' % opt)
522 write_to_bazelrc('build:opt --host_copt=-march=native')
523 write_to_bazelrc('build:opt --define with_default_optimizations=true')
674 '%s/Android/Sdk/ndk-bundle' % environ_cp['APPDATA'])
676 default_ndk_path = '%s/library/Android/Sdk/ndk-bundle' % environ_cp['HOME']
678 default_ndk_path = '%s/Android/Sdk/ndk-bundle' % environ_cp['HOME']
709 os.path.exists(os.path.join(path, 'build-tools')))
718 'subdirectories "platforms" and "build-tools".'))
722 api_levels = [x.replace('android-', '') for x in api_levels]
727 'android-' + api_level))
732 var_default=api_levels[-1],
736 error_msg='Android-%s is not present in the SDK path.')
738 build_tools = os.path.join(android_sdk_home_path, 'build-tools')
743 os.path.join(android_sdk_home_path, 'build-tools', version))
748 var_default=versions[-1],
752 error_msg=('The selected SDK does not have build-tools version %s '
771 ndk_api_level = revision.group(1)
809 Given (7, 2) -> 7.0
810 (7.0.1, 2) -> 7.0
811 (5, 1) -> 5
812 (5.0.3.2, 1) -> 5
823 v = v + (['0'] * (sequence_count - len(v)))
864 'lib/powerpc64le-linux-gnu',
865 'lib/x86_64-linux-gnu',
905 tf_cudnn_version = reformat_version_sequence(str(tf_cudnn_version), 1)
941 cudnn_path_from_ldconfig = run_shell([ldconfig_bin, '-p'])
945 cudnn_path_from_ldconfig = cudnn_path_from_ldconfig.group(1)
991 if cudnn and len(cudnn.group(1)):
992 cudnn = convert_version_to_int(cudnn.group(1))
993 if cudart and len(cudart.group(1)):
994 cudart = convert_version_to_int(cudart.group(1))
1011 ValueError: if this method was called under non-Linux platform.
1019 False))) != '1':
1058 ver_str = matches.group(1)
1062 if highest_ver[1] is not None:
1064 tf_tensorrt_version = highest_ver[1]
1069 ldconfig_output = run_shell([ldconfig_bin, '-p'])
1070 search_result = re.search('.*libnvinfer.so\\.?([0-9.]*).* => (.*)',
1078 tf_tensorrt_version = search_result.group(1)
1118 ValueError: if this method was called under non-Linux platform.
1135 tf_nccl_version = reformat_version_sequence(str(tf_nccl_version), 1)
1138 # like /usr/lib/x86_64-linux-gnu and the header file in the corresponding
1145 nccl2_path_from_ldconfig = run_shell([ldconfig_bin, '-p'])
1149 nccl2_path_from_ldconfig = nccl2_path_from_ldconfig.group(1)
1155 if re.search('.*linux-gnu', nccl_install_path):
1175 'The header for NCCL2 cannot be found. Please install the libnccl-dev package.'
1263 pattern = re.compile('[0-9]*\\.[0-9]*')
1284 'Please specify a list of comma-separated '
1288 'https://developer.nvidia.com/cuda-gpus.\nPlease'
1304 m = re.match('[0-9]+.[0-9]+', compute_capability)
1312 'and higher. Please re-specify the list of compute '
1334 if environ_cp.get('TF_CUDA_CLANG') == '1':
1335 write_to_bazelrc('build --config=cuda_clang')
1336 write_to_bazelrc('test --config=cuda_clang')
1338 write_to_bazelrc('build --config=cuda')
1339 write_to_bazelrc('test --config=cuda')
1412 'include directory. (Use --config=sycl_trisycl '
1506 write_to_bazelrc('test --flaky_test_attempts=3')
1507 write_to_bazelrc('test --test_size_filters=small,medium')
1509 'test --test_tag_filters=-benchmark-test,-no_oss,-oss_serial')
1510 write_to_bazelrc('test --build_tag_filters=-benchmark-test,-no_oss')
1512 if env.get('TF_NEED_CUDA', None) == '1':
1514 'test --test_tag_filters=-no_windows,-no_windows_gpu,-no_gpu')
1516 'test --build_tag_filters=-no_windows,-no_windows_gpu,-no_gpu')
1518 write_to_bazelrc('test --test_tag_filters=-no_windows,-gpu')
1519 write_to_bazelrc('test --build_tag_filters=-no_windows,-gpu')
1521 write_to_bazelrc('test --test_tag_filters=-gpu,-nomac,-no_mac')
1522 write_to_bazelrc('test --build_tag_filters=-gpu,-nomac,-no_mac')
1524 if env.get('TF_NEED_CUDA', None) == '1':
1525 write_to_bazelrc('test --test_tag_filters=-no_gpu')
1526 write_to_bazelrc('test --build_tag_filters=-no_gpu')
1527 write_to_bazelrc('test --test_env=LD_LIBRARY_PATH')
1529 write_to_bazelrc('test --test_tag_filters=-gpu')
1530 write_to_bazelrc('test --build_tag_filters=-gpu')
1543 write_to_bazelrc('build --define=PREFIX=%s' % environ_cp['PREFIX'])
1545 write_to_bazelrc('build --define=LIBDIR=%s' % environ_cp['LIBDIR'])
1547 write_to_bazelrc('build --define=INCLUDEDIR=%s' % environ_cp['INCLUDEDIR'])
1552 # The non-monolithic build is not supported yet
1553 write_to_bazelrc('build --config monolithic')
1555 write_to_bazelrc('build --copt=-w --host_copt=-w')
1558 'build --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN')
1560 write_to_bazelrc('build --verbose_failures')
1563 write_to_bazelrc('build --distinct_host_configuration=false')
1576 write_to_bazelrc('build --define=override_eigen_strong_inline=true')
1581 print('\t--config=%-12s\t# %s' % (name, help_text))
1611 '--workspace',
1649 # The numpy package on ppc64le uses OpenBLAS which has multi-threading
1650 # issues that lead to incorrect answers. Set OMP_NUM_THREADS=1 at
1654 write_action_env_to_bazelrc('OMP_NUM_THREADS', 1)
1661 if environ_cp.get('TF_NEED_OPENCL_SYCL') == '1':
1665 if environ_cp.get('TF_NEED_COMPUTECPP') == '1':
1671 if (environ_cp.get('TF_NEED_ROCM') == '1' and
1673 environ_cp.get('LD_LIBRARY_PATH') != '1'):
1678 if (environ_cp.get('TF_NEED_CUDA') == '1' and
1688 'LD_LIBRARY_PATH') != '1':
1693 if environ_cp.get('TF_CUDA_CLANG') == '1':
1696 if environ_cp.get('TF_DOWNLOAD_CLANG') != '1':
1701 write_to_bazelrc('build:cuda_clang --config=download_clang_use_lld')
1702 write_to_bazelrc('test:cuda_clang --config=download_clang_use_lld')
1713 if environ_cp.get('TF_DOWNLOAD_CLANG') == '1':
1714 write_to_bazelrc('build --config=download_clang')
1715 write_to_bazelrc('test --config=download_clang')
1718 # At most 1 GPU platform can be configured.
1720 if environ_cp.get('TF_NEED_OPENCL_SYCL') == '1':
1721 gpu_platform_count += 1
1722 if environ_cp.get('TF_NEED_ROCM') == '1':
1723 gpu_platform_count += 1
1724 if environ_cp.get('TF_NEED_CUDA') == '1':
1725 gpu_platform_count += 1
1728 'At most 1 GPU platform can be configured.')
1731 if environ_cp.get('TF_NEED_MPI') == '1':
1741 write_to_bazelrc('build:v2 --define=tf_api_version=2')
1761 'adding "--config=<>" to your build command. See .bazelrc for more '