Delete SYCL support
See discussion here:
https://github.com/tensorflow/tensorflow/issues/41809#issuecomment-688021592
Fixes #41809.
PiperOrigin-RevId: 331808169
Change-Id: Ib0861cf250c92c20f0e8a22adce89a4dc4d3548a
diff --git a/configure.py b/configure.py
index 96cc70a..5b9fd55 100644
--- a/configure.py
+++ b/configure.py
@@ -38,9 +38,6 @@
_DEFAULT_TENSORRT_VERSION = '6'
_DEFAULT_CUDA_COMPUTE_CAPABILITIES = '3.5,7.0'
-_TF_OPENCL_VERSION = '1.2'
-_DEFAULT_COMPUTECPP_TOOLKIT_PATH = '/usr/local/computecpp'
-_DEFAULT_TRISYCL_INCLUDE_DIR = '/usr/local/triSYCL/include'
_SUPPORTED_ANDROID_NDK_VERSIONS = [10, 11, 12, 13, 14, 15, 16, 17, 18]
_DEFAULT_PROMPT_ASK_ATTEMPTS = 10
@@ -1114,62 +1111,6 @@
write_action_env_to_bazelrc('HOST_C_COMPILER', host_c_compiler)
-def set_computecpp_toolkit_path(environ_cp):
- """Set COMPUTECPP_TOOLKIT_PATH."""
-
- def toolkit_exists(toolkit_path):
- """Check if a computecpp toolkit path is valid."""
- if is_linux():
- sycl_rt_lib_path = 'lib/libComputeCpp.so'
- else:
- sycl_rt_lib_path = ''
-
- sycl_rt_lib_path_full = os.path.join(toolkit_path, sycl_rt_lib_path)
- exists = os.path.exists(sycl_rt_lib_path_full)
- if not exists:
- print('Invalid SYCL %s library path. %s cannot be found' %
- (_TF_OPENCL_VERSION, sycl_rt_lib_path_full))
- return exists
-
- computecpp_toolkit_path = prompt_loop_or_load_from_env(
- environ_cp,
- var_name='COMPUTECPP_TOOLKIT_PATH',
- var_default=_DEFAULT_COMPUTECPP_TOOLKIT_PATH,
- ask_for_var=(
- 'Please specify the location where ComputeCpp for SYCL %s is '
- 'installed.' % _TF_OPENCL_VERSION),
- check_success=toolkit_exists,
- error_msg='Invalid SYCL compiler path. %s cannot be found.',
- suppress_default_error=True)
-
- write_action_env_to_bazelrc('COMPUTECPP_TOOLKIT_PATH',
- computecpp_toolkit_path)
-
-
-def set_trisycl_include_dir(environ_cp):
- """Set TRISYCL_INCLUDE_DIR."""
-
- ask_trisycl_include_dir = ('Please specify the location of the triSYCL '
- 'include directory. (Use --config=sycl_trisycl '
- 'when building with Bazel) '
- '[Default is %s]: ') % (
- _DEFAULT_TRISYCL_INCLUDE_DIR)
-
- while True:
- trisycl_include_dir = get_from_env_or_user_or_default(
- environ_cp, 'TRISYCL_INCLUDE_DIR', ask_trisycl_include_dir,
- _DEFAULT_TRISYCL_INCLUDE_DIR)
- if os.path.exists(trisycl_include_dir):
- break
-
- print('Invalid triSYCL include directory, %s cannot be found' %
- (trisycl_include_dir))
-
- # Set TRISYCL_INCLUDE_DIR
- environ_cp['TRISYCL_INCLUDE_DIR'] = trisycl_include_dir
- write_action_env_to_bazelrc('TRISYCL_INCLUDE_DIR', trisycl_include_dir)
-
-
def system_specific_test_config(environ_cp):
"""Add default build and test flags required for TF tests to bazelrc."""
write_to_bazelrc('test --flaky_test_attempts=3')
@@ -1397,8 +1338,6 @@
setup_python(environ_cp)
if is_windows():
- environ_cp['TF_NEED_OPENCL_SYCL'] = '0'
- environ_cp['TF_NEED_COMPUTECPP'] = '0'
environ_cp['TF_NEED_OPENCL'] = '0'
environ_cp['TF_CUDA_CLANG'] = '0'
environ_cp['TF_NEED_TENSORRT'] = '0'
@@ -1416,21 +1355,6 @@
write_to_bazelrc('build --config=xla')
set_action_env_var(
- environ_cp,
- 'TF_NEED_OPENCL_SYCL',
- 'OpenCL SYCL',
- False,
- bazel_config_name='sycl')
- if environ_cp.get('TF_NEED_OPENCL_SYCL') == '1':
- set_host_cxx_compiler(environ_cp)
- set_host_c_compiler(environ_cp)
- set_action_env_var(environ_cp, 'TF_NEED_COMPUTECPP', 'ComputeCPP', True)
- if environ_cp.get('TF_NEED_COMPUTECPP') == '1':
- set_computecpp_toolkit_path(environ_cp)
- else:
- set_trisycl_include_dir(environ_cp)
-
- set_action_env_var(
environ_cp, 'TF_NEED_ROCM', 'ROCm', False, bazel_config_name='rocm')
if (environ_cp.get('TF_NEED_ROCM') == '1' and
'LD_LIBRARY_PATH' in environ_cp and
@@ -1528,17 +1452,15 @@
# use it for the CPU build.
set_tf_download_clang(environ_cp)
- # SYCL / ROCm / CUDA are mutually exclusive.
+ # ROCm / CUDA are mutually exclusive.
# At most 1 GPU platform can be configured.
gpu_platform_count = 0
- if environ_cp.get('TF_NEED_OPENCL_SYCL') == '1':
- gpu_platform_count += 1
if environ_cp.get('TF_NEED_ROCM') == '1':
gpu_platform_count += 1
if environ_cp.get('TF_NEED_CUDA') == '1':
gpu_platform_count += 1
if gpu_platform_count >= 2:
- raise UserInputError('SYCL / CUDA / ROCm are mututally exclusive. '
+ raise UserInputError('CUDA / ROCm are mututally exclusive. '
'At most 1 GPU platform can be configured.')
set_cc_opt_flags(environ_cp)