aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitmodules0
-rw-r--r--tensorflow/cc/ops/op_gen_overrides.pbtxt2
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/estimator.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/run_config.py30
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/run_config_test.py25
-rw-r--r--tensorflow/python/estimator/BUILD11
-rw-r--r--tensorflow/python/estimator/estimator.py2
-rw-r--r--tensorflow/python/estimator/estimator_test.py9
-rw-r--r--tensorflow/python/estimator/run_config.py60
-rw-r--r--tensorflow/python/estimator/run_config_test.py52
-rw-r--r--tensorflow/tensorflow.bzl2
-rw-r--r--tensorflow/tools/api/golden/tensorflow.estimator.-run-config.pbtxt5
-rwxr-xr-x[-rw-r--r--]tensorflow/tools/ci_build/linux/cmake/run.sh0
-rw-r--r--third_party/jpeg.BUILD416
-rw-r--r--third_party/sycl/sycl/LICENSE.text.tpl268
15 files changed, 177 insertions, 707 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index e69de29bb2..0000000000
--- a/.gitmodules
+++ /dev/null
diff --git a/tensorflow/cc/ops/op_gen_overrides.pbtxt b/tensorflow/cc/ops/op_gen_overrides.pbtxt
index cd94ddf4a1..1dffb10c03 100644
--- a/tensorflow/cc/ops/op_gen_overrides.pbtxt
+++ b/tensorflow/cc/ops/op_gen_overrides.pbtxt
@@ -22,7 +22,7 @@ op { name: "Where" input_rename: { from: "input" to: "condition" } }
op { name: "ThreadUnsafeUnigramCandidateSampler", skip: true }
# control_flow_ops
-# TODO(josh11b): Hide Switch and Merge once we write and migrate users to
+# TODO(joshl): Hide Switch and Merge once we write and migrate users to
# a Cond() API.
#op { name: "Switch" hide: true }
#op { name: "Merge" hide: true }
diff --git a/tensorflow/contrib/learn/python/learn/estimators/estimator.py b/tensorflow/contrib/learn/python/learn/estimators/estimator.py
index 36f843ba8e..e8142b659b 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/estimator.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/estimator.py
@@ -372,7 +372,6 @@ class BaseEstimator(
logging.info('Using default config.')
else:
self._config = config
- logging.info('Using config: %s', str(vars(self._config)))
if self._config.session_config is None:
self._session_config = config_pb2.ConfigProto(allow_soft_placement=True)
@@ -397,6 +396,7 @@ class BaseEstimator(
self._model_dir)
if self._config.model_dir is None:
self._config = self._config.replace(model_dir=self._model_dir)
+ logging.info('Using config: %s', str(vars(self._config)))
# Set device function depending if there are replicas or not.
self._device_fn = _get_replica_device_setter(self._config)
diff --git a/tensorflow/contrib/learn/python/learn/estimators/run_config.py b/tensorflow/contrib/learn/python/learn/estimators/run_config.py
index 3b7d618b60..937664b116 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/run_config.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/run_config.py
@@ -19,7 +19,6 @@ from __future__ import division
from __future__ import print_function
import collections
-import copy
import json
import os
@@ -32,6 +31,9 @@ from tensorflow.python.platform import tf_logging as logging
from tensorflow.python.training import server_lib
+# A list of the property names in RunConfig user allows to change. They will
+# not affect the execution framework, so when execution framework checks the
+# `uid` of the RunConfig, it should be ingored.
_DEFAULT_UID_WHITE_LIST = [
'tf_random_seed',
'save_summary_steps',
@@ -300,7 +302,14 @@ class RunConfig(ClusterConfig, core_run_config.RunConfig):
"""Returns a new instance of `RunConfig` replacing specified properties.
Only the properties in the following list are allowed to be replaced:
- - `model_dir`.
+ - `model_dir`,
+ - `tf_random_seed`,
+ - `save_summary_steps`,
+ - `save_checkpoints_steps`,
+ - `save_checkpoints_secs`,
+ - `session_config`,
+ - `keep_checkpoint_max`,
+ - `keep_checkpoint_every_n_hours`,
Args:
**kwargs: keyword named properties with new values.
@@ -312,18 +321,11 @@ class RunConfig(ClusterConfig, core_run_config.RunConfig):
Returns:
a new instance of `RunConfig`.
"""
-
- new_copy = copy.deepcopy(self)
-
- # TODO(b/33295821): Allow more fields to be replaced.
- for key, new_value in six.iteritems(kwargs):
- if key == 'model_dir':
- new_copy._model_dir = new_value # pylint: disable=protected-access
- continue
-
- raise ValueError('{} is not supported by RunConfig replace'.format(key))
-
- return new_copy
+ # In addition to the _DEFAULT_UID_WHITE_LIST, also allow model_dir to be
+ # replaced, as most execution frameworks change it.
+ return super(RunConfig, self)._replace(
+ allowed_properties_list=['model_dir'] + _DEFAULT_UID_WHITE_LIST,
+ **kwargs)
@experimental
def uid(self, whitelist=None):
diff --git a/tensorflow/contrib/learn/python/learn/estimators/run_config_test.py b/tensorflow/contrib/learn/python/learn/estimators/run_config_test.py
index 9102e42bfb..f7a7a7bd03 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/run_config_test.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/run_config_test.py
@@ -28,6 +28,7 @@ from tensorflow.python.training import server_lib
TEST_DIR = "test_dir"
ANOTHER_TEST_DIR = "another_test_dir"
+MASTER = "master_"
RANDOM_SEED = 123
patch = test.mock.patch
@@ -253,13 +254,31 @@ class RunConfigTest(test.TestCase):
new_config = config.replace(model_dir=ANOTHER_TEST_DIR)
self.assertEqual(ANOTHER_TEST_DIR, new_config.model_dir)
self.assertEqual(RANDOM_SEED, new_config.tf_random_seed)
-
- self.assertEqual(TEST_DIR, config.model_dir)
self.assertEqual(RANDOM_SEED, config.tf_random_seed)
+ def test_replace_with_allowed_properties(self):
+ config = run_config_lib.RunConfig().replace(
+ tf_random_seed=11,
+ save_summary_steps=12,
+ save_checkpoints_steps=13,
+ save_checkpoints_secs=14,
+ session_config=15,
+ keep_checkpoint_max=16,
+ keep_checkpoint_every_n_hours=17)
+ self.assertEqual(11, config.tf_random_seed)
+ self.assertEqual(12, config.save_summary_steps)
+ self.assertEqual(13, config.save_checkpoints_steps)
+ self.assertEqual(14, config.save_checkpoints_secs)
+ self.assertEqual(15, config.session_config)
+ self.assertEqual(16, config.keep_checkpoint_max)
+ self.assertEqual(17, config.keep_checkpoint_every_n_hours)
+
+ def test_replace_with_disallowallowed_properties(self):
+ config = run_config_lib.RunConfig(
+ tf_random_seed=RANDOM_SEED, model_dir=TEST_DIR)
with self.assertRaises(ValueError):
# tf_random_seed is not allowed to be replaced.
- config.replace(tf_random_seed=RANDOM_SEED)
+ config.replace(master=MASTER)
with self.assertRaises(ValueError):
config.replace(some_undefined_property=RANDOM_SEED)
diff --git a/tensorflow/python/estimator/BUILD b/tensorflow/python/estimator/BUILD
index 52194973d2..cf76f8598b 100644
--- a/tensorflow/python/estimator/BUILD
+++ b/tensorflow/python/estimator/BUILD
@@ -73,6 +73,17 @@ py_library(
srcs_version = "PY2AND3",
)
+py_test(
+ name = "run_config_test",
+ size = "small",
+ srcs = ["run_config_test.py"],
+ srcs_version = "PY2AND3",
+ deps = [
+ ":run_config",
+ "//tensorflow/python:client_testlib",
+ ],
+)
+
py_library(
name = "estimator",
srcs = [
diff --git a/tensorflow/python/estimator/estimator.py b/tensorflow/python/estimator/estimator.py
index c394315cfa..c97efc127a 100644
--- a/tensorflow/python/estimator/estimator.py
+++ b/tensorflow/python/estimator/estimator.py
@@ -157,6 +157,8 @@ class Estimator(object):
self._model_dir = tempfile.mkdtemp()
logging.warning('Using temporary folder as model directory: %s',
self._model_dir)
+ if self._config.model_dir is None:
+ self._config = self._config.replace(model_dir=self._model_dir)
logging.info('Using config: %s', str(vars(self._config)))
if self._config.session_config is None:
diff --git a/tensorflow/python/estimator/estimator_test.py b/tensorflow/python/estimator/estimator_test.py
index 5d9913d734..5c8c3a2626 100644
--- a/tensorflow/python/estimator/estimator_test.py
+++ b/tensorflow/python/estimator/estimator_test.py
@@ -152,8 +152,10 @@ class EstimatorConstructorTest(test.TestCase):
def model_fn(features, labels):
_, _ = features, labels
- est = estimator.Estimator(model_fn=model_fn)
- self.assertTrue(est.model_dir is not None)
+ with test.mock.patch.object(tempfile, 'mkdtemp', return_value=_TMP_DIR):
+ est = estimator.Estimator(model_fn=model_fn)
+ self.assertEqual(_TMP_DIR, est.config.model_dir)
+ self.assertEqual(_TMP_DIR, est.model_dir)
def test_model_dir_in_constructor(self):
@@ -161,6 +163,7 @@ class EstimatorConstructorTest(test.TestCase):
_, _ = features, labels
est = estimator.Estimator(model_fn=model_fn, model_dir=_TMP_DIR)
+ self.assertEqual(_TMP_DIR, est.config.model_dir)
self.assertEqual(_TMP_DIR, est.model_dir)
def test_model_dir_in_run_config(self):
@@ -175,6 +178,7 @@ class EstimatorConstructorTest(test.TestCase):
_, _ = features, labels
est = estimator.Estimator(model_fn=model_fn, config=FakeConfig())
+ self.assertEqual(_TMP_DIR, est.config.model_dir)
self.assertEqual(_TMP_DIR, est.model_dir)
def test_same_model_dir_in_constructor_and_run_config(self):
@@ -190,6 +194,7 @@ class EstimatorConstructorTest(test.TestCase):
est = estimator.Estimator(
model_fn=model_fn, config=FakeConfig(), model_dir=_TMP_DIR)
+ self.assertEqual(_TMP_DIR, est.config.model_dir)
self.assertEqual(_TMP_DIR, est.model_dir)
def test_different_model_dir_in_constructor_and_run_config(self):
diff --git a/tensorflow/python/estimator/run_config.py b/tensorflow/python/estimator/run_config.py
index 504bf5c3fe..2b6237643d 100644
--- a/tensorflow/python/estimator/run_config.py
+++ b/tensorflow/python/estimator/run_config.py
@@ -18,6 +18,10 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
+import copy
+
+import six
+
class TaskType(object):
MASTER = 'master'
@@ -28,6 +32,9 @@ class TaskType(object):
class RunConfig(object):
"""This class specifies the configurations for an `Estimator` run."""
+ def __init__(self):
+ self._model_dir = None
+
@property
def cluster_spec(self):
return None
@@ -90,4 +97,55 @@ class RunConfig(object):
@property
def model_dir(self):
- return None
+ return self._model_dir
+
+ def replace(self, **kwargs):
+ """Returns a new instance of `RunConfig` replacing specified properties.
+
+ Only the properties in the following list are allowed to be replaced:
+ - `model_dir`.
+
+ Args:
+ **kwargs: keyword named properties with new values.
+
+ Raises:
+ ValueError: If any property name in `kwargs` does not exist or is not
+ allowed to be replaced.
+
+ Returns:
+ a new instance of `RunConfig`.
+ """
+ return self._replace(allowed_properties_list=['model_dir'], **kwargs)
+
+ def _replace(self, allowed_properties_list=None, **kwargs):
+ """See `replace`.
+
+ N.B.: This implementation assumes that for key named "foo", the underlying
+ property the RunConfig holds is "_foo" (with one leading underscore).
+
+ Args:
+ allowed_properties_list: The property name list allowed to be replaced.
+ **kwargs: keyword named properties with new values.
+
+ Raises:
+ ValueError: If any property name in `kwargs` does not exist or is not
+ allowed to be replaced.
+
+ Returns:
+ a new instance of `RunConfig`.
+ """
+
+ new_copy = copy.deepcopy(self)
+
+ allowed_properties_list = allowed_properties_list or []
+
+ for key, new_value in six.iteritems(kwargs):
+ if key in allowed_properties_list:
+ setattr(new_copy, '_' + key, new_value)
+ continue
+
+ raise ValueError(
+ 'Replacing {} is not supported. Allowed properties are {}.'.format(
+ key, allowed_properties_list))
+
+ return new_copy
diff --git a/tensorflow/python/estimator/run_config_test.py b/tensorflow/python/estimator/run_config_test.py
new file mode 100644
index 0000000000..3f83ae0c34
--- /dev/null
+++ b/tensorflow/python/estimator/run_config_test.py
@@ -0,0 +1,52 @@
+# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+"""RunConfig tests."""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+from tensorflow.python.estimator import run_config as run_config_lib
+from tensorflow.python.platform import test
+
+_TEST_DIR = 'test_dir'
+_MASTER = 'master_'
+_NOT_SUPPORTED_REPLACE_PROPERTY_MSG = 'Replacing .*is not supported'
+
+
+class RunConfigTest(test.TestCase):
+
+ def test_model_dir(self):
+ empty_config = run_config_lib.RunConfig()
+ self.assertIsNone(empty_config.model_dir)
+
+ new_config = empty_config.replace(model_dir=_TEST_DIR)
+ self.assertEqual(_TEST_DIR, new_config.model_dir)
+
+ def test_replace(self):
+ config = run_config_lib.RunConfig()
+
+ with self.assertRaisesRegexp(
+ ValueError, _NOT_SUPPORTED_REPLACE_PROPERTY_MSG):
+ # master is not allowed to be replaced.
+ config.replace(master=_MASTER)
+
+ with self.assertRaisesRegexp(
+ ValueError, _NOT_SUPPORTED_REPLACE_PROPERTY_MSG):
+ config.replace(some_undefined_property=_MASTER)
+
+
+if __name__ == '__main__':
+ test.main()
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 7baddf301c..ff4222032d 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -241,7 +241,7 @@ def tf_gen_op_wrapper_cc(name,
# hdrs = [ "ops/array_ops_internal.h",
# "ops/math_ops_internal.h" ],
# deps = [ ... ])
-# TODO(josh11b): Cleaner approach for hidden ops.
+# TODO(joshl): Cleaner approach for hidden ops.
def tf_gen_op_wrappers_cc(name,
op_lib_names=[],
other_srcs=[],
diff --git a/tensorflow/tools/api/golden/tensorflow.estimator.-run-config.pbtxt b/tensorflow/tools/api/golden/tensorflow.estimator.-run-config.pbtxt
index 32082fc10b..d69c475a31 100644
--- a/tensorflow/tools/api/golden/tensorflow.estimator.-run-config.pbtxt
+++ b/tensorflow/tools/api/golden/tensorflow.estimator.-run-config.pbtxt
@@ -68,5 +68,10 @@ tf_class {
}
member_method {
name: "__init__"
+ argspec: "args=[\'self\'], varargs=None, keywords=None, defaults=None"
+ }
+ member_method {
+ name: "replace"
+ argspec: "args=[\'self\'], varargs=None, keywords=kwargs, defaults=None"
}
}
diff --git a/tensorflow/tools/ci_build/linux/cmake/run.sh b/tensorflow/tools/ci_build/linux/cmake/run.sh
index d9bf4f01b5..d9bf4f01b5 100644..100755
--- a/tensorflow/tools/ci_build/linux/cmake/run.sh
+++ b/tensorflow/tools/ci_build/linux/cmake/run.sh
diff --git a/third_party/jpeg.BUILD b/third_party/jpeg.BUILD
deleted file mode 100644
index cbc1e86e51..0000000000
--- a/third_party/jpeg.BUILD
+++ /dev/null
@@ -1,416 +0,0 @@
-# Description:
-# libjpeg-turbo is a drop in replacement for jpeglib optimized with SIMD.
-
-licenses(["notice"]) # custom notice-style license, see LICENSE.md
-
-exports_files(["LICENSE.md"])
-
-libjpegturbo_nocopts = "-[W]error"
-
-libjpegturbo_copts = select({
- ":android": [
- "-O2",
- "-fPIE",
- "-w",
- ],
- ":windows": [
- "/Ox",
- "/w14711", # function 'function' selected for inline expansion
- "/w14710", # 'function' : function not inlined
- ],
- "//conditions:default": [
- "-O3",
- "-w",
- ],
-}) + select({
- ":armeabi-v7a": [
- "-D__ARM_NEON__",
- "-march=armv7-a",
- "-mfloat-abi=softfp",
- "-fprefetch-loop-arrays",
- ],
- "//conditions:default": [],
-})
-
-cc_library(
- name = "jpeg",
- srcs = [
- "jaricom.c",
- "jcapimin.c",
- "jcapistd.c",
- "jcarith.c",
- "jccoefct.c",
- "jccolor.c",
- "jcdctmgr.c",
- "jchuff.c",
- "jchuff.h",
- "jcinit.c",
- "jcmainct.c",
- "jcmarker.c",
- "jcmaster.c",
- "jcomapi.c",
- "jconfig.h",
- "jconfigint.h",
- "jcparam.c",
- "jcphuff.c",
- "jcprepct.c",
- "jcsample.c",
- "jctrans.c",
- "jdapimin.c",
- "jdapistd.c",
- "jdarith.c",
- "jdatadst.c",
- "jdatasrc.c",
- "jdcoefct.c",
- "jdcoefct.h",
- "jdcolor.c",
- "jdct.h",
- "jddctmgr.c",
- "jdhuff.c",
- "jdhuff.h",
- "jdinput.c",
- "jdmainct.c",
- "jdmainct.h",
- "jdmarker.c",
- "jdmaster.c",
- "jdmaster.h",
- "jdmerge.c",
- "jdphuff.c",
- "jdpostct.c",
- "jdsample.c",
- "jdsample.h",
- "jdtrans.c",
- "jerror.c",
- "jfdctflt.c",
- "jfdctfst.c",
- "jfdctint.c",
- "jidctflt.c",
- "jidctfst.c",
- "jidctint.c",
- "jidctred.c",
- "jinclude.h",
- "jmemmgr.c",
- "jmemnobs.c",
- "jmemsys.h",
- "jpeg_nbits_table.h",
- "jpegcomp.h",
- "jquant1.c",
- "jquant2.c",
- "jutils.c",
- "jversion.h",
- ],
- hdrs = [
- "jccolext.c", # should have been named .inc
- "jdcol565.c", # should have been named .inc
- "jdcolext.c", # should have been named .inc
- "jdmrg565.c", # should have been named .inc
- "jdmrgext.c", # should have been named .inc
- "jerror.h",
- "jmorecfg.h",
- "jpegint.h",
- "jpeglib.h",
- "jstdhuff.c", # should have been named .inc
- ],
- copts = libjpegturbo_copts,
- nocopts = libjpegturbo_nocopts,
- visibility = ["//visibility:public"],
- deps = select({
- ":k8": [":simd_x86_64"],
- ":armeabi-v7a": [":simd_armv7a"],
- ":arm64-v8a": [":simd_armv8a"],
- "//conditions:default": [":simd_none"],
- }),
-)
-
-cc_library(
- name = "simd_x86_64",
- srcs = [
- "jchuff.h",
- "jconfig.h",
- "jdct.h",
- "jerror.h",
- "jinclude.h",
- "jmorecfg.h",
- "jpegint.h",
- "jpeglib.h",
- "jsimd.h",
- "jsimddct.h",
- "simd/jccolor-sse2-64.o",
- "simd/jcgray-sse2-64.o",
- "simd/jchuff-sse2-64.o",
- "simd/jcsample-sse2-64.o",
- "simd/jdcolor-sse2-64.o",
- "simd/jdmerge-sse2-64.o",
- "simd/jdsample-sse2-64.o",
- "simd/jfdctflt-sse-64.o",
- "simd/jfdctfst-sse2-64.o",
- "simd/jfdctint-sse2-64.o",
- "simd/jidctflt-sse2-64.o",
- "simd/jidctfst-sse2-64.o",
- "simd/jidctint-sse2-64.o",
- "simd/jidctred-sse2-64.o",
- "simd/jquantf-sse2-64.o",
- "simd/jquanti-sse2-64.o",
- "simd/jsimd.h",
- "simd/jsimd_x86_64.c",
- ],
- copts = libjpegturbo_copts,
- linkstatic = 1,
- nocopts = libjpegturbo_nocopts,
-)
-
-genrule(
- name = "simd_x86_64_assemblage23",
- srcs = [
- "simd/jccolext-sse2-64.asm",
- "simd/jccolor-sse2-64.asm",
- "simd/jcgray-sse2-64.asm",
- "simd/jcgryext-sse2-64.asm",
- "simd/jchuff-sse2-64.asm",
- "simd/jcolsamp.inc",
- "simd/jcsample-sse2-64.asm",
- "simd/jdcolext-sse2-64.asm",
- "simd/jdcolor-sse2-64.asm",
- "simd/jdct.inc",
- "simd/jdmerge-sse2-64.asm",
- "simd/jdmrgext-sse2-64.asm",
- "simd/jdsample-sse2-64.asm",
- "simd/jfdctflt-sse-64.asm",
- "simd/jfdctfst-sse2-64.asm",
- "simd/jfdctint-sse2-64.asm",
- "simd/jidctflt-sse2-64.asm",
- "simd/jidctfst-sse2-64.asm",
- "simd/jidctint-sse2-64.asm",
- "simd/jidctred-sse2-64.asm",
- "simd/jpeg_nbits_table.inc",
- "simd/jquantf-sse2-64.asm",
- "simd/jquanti-sse2-64.asm",
- "simd/jsimdcfg.inc",
- "simd/jsimdext.inc",
- ],
- outs = [
- "simd/jccolor-sse2-64.o",
- "simd/jcgray-sse2-64.o",
- "simd/jchuff-sse2-64.o",
- "simd/jcsample-sse2-64.o",
- "simd/jdcolor-sse2-64.o",
- "simd/jdmerge-sse2-64.o",
- "simd/jdsample-sse2-64.o",
- "simd/jfdctflt-sse-64.o",
- "simd/jfdctfst-sse2-64.o",
- "simd/jfdctint-sse2-64.o",
- "simd/jidctflt-sse2-64.o",
- "simd/jidctfst-sse2-64.o",
- "simd/jidctint-sse2-64.o",
- "simd/jidctred-sse2-64.o",
- "simd/jquantf-sse2-64.o",
- "simd/jquanti-sse2-64.o",
- ],
- cmd = "for out in $(OUTS); do\n" +
- " $(location @nasm//:nasm) -f elf64" +
- " -DELF -DPIC -DRGBX_FILLER_0XFF -D__x86_64__ -DARCH_X86_64" +
- " -I $$(dirname $(location simd/jdct.inc))/" +
- " -I $$(dirname $(location simd/jsimdcfg.inc))/" +
- " -o $$out" +
- " $$(dirname $(location simd/jdct.inc))/$$(basename $${out%.o}.asm)\n" +
- "done",
- tools = ["@nasm//:nasm"],
-)
-
-cc_library(
- name = "simd_armv7a",
- srcs = [
- "jchuff.h",
- "jconfig.h",
- "jdct.h",
- "jinclude.h",
- "jmorecfg.h",
- "jpeglib.h",
- "jsimd.h",
- "jsimddct.h",
- "simd/jsimd.h",
- "simd/jsimd_arm.c",
- "simd/jsimd_arm_neon.S",
- ],
- copts = libjpegturbo_copts,
- nocopts = libjpegturbo_nocopts,
-)
-
-cc_library(
- name = "simd_armv8a",
- srcs = [
- "jchuff.h",
- "jconfig.h",
- "jdct.h",
- "jinclude.h",
- "jmorecfg.h",
- "jpeglib.h",
- "jsimd.h",
- "jsimddct.h",
- "simd/jsimd.h",
- "simd/jsimd_arm64.c",
- "simd/jsimd_arm64_neon.S",
- ],
- copts = libjpegturbo_copts,
- nocopts = libjpegturbo_nocopts,
-)
-
-cc_library(
- name = "simd_none",
- srcs = [
- "jchuff.h",
- "jconfig.h",
- "jdct.h",
- "jerror.h",
- "jinclude.h",
- "jmorecfg.h",
- "jpegint.h",
- "jpeglib.h",
- "jsimd.h",
- "jsimd_none.c",
- "jsimddct.h",
- ],
- copts = libjpegturbo_copts,
- nocopts = libjpegturbo_nocopts,
-)
-
-genrule(
- name = "configure",
- outs = ["jconfig.h"],
- cmd = "cat <<'EOF' >$@\n" +
- "#define JPEG_LIB_VERSION 62\n" +
- "#define LIBJPEG_TURBO_VERSION 1.5.1\n" +
- "#define LIBJPEG_TURBO_VERSION_NUMBER 1005001\n" +
- "#define C_ARITH_CODING_SUPPORTED 1\n" +
- "#define D_ARITH_CODING_SUPPORTED 1\n" +
- "#define BITS_IN_JSAMPLE 8\n" +
- "#define HAVE_LOCALE_H 1\n" +
- "#define HAVE_STDDEF_H 1\n" +
- "#define HAVE_STDLIB_H 1\n" +
- "#define HAVE_UNSIGNED_CHAR 1\n" +
- "#define HAVE_UNSIGNED_SHORT 1\n" +
- "#define MEM_SRCDST_SUPPORTED 1\n" +
- "#define NEED_SYS_TYPES_H 1\n" +
- select({
- ":k8": "#define WITH_SIMD 1\n",
- ":armeabi-v7a": "#define WITH_SIMD 1\n",
- ":arm64-v8a": "#define WITH_SIMD 1\n",
- "//conditions:default": "",
- }) +
- "EOF",
-)
-
-genrule(
- name = "configure_internal",
- outs = ["jconfigint.h"],
- cmd = "cat <<'EOF' >$@\n" +
- "#define BUILD \"20161115\"\n" +
- "#ifdef _MSC_VER /* Windows */\n" +
- "#define INLINE __inline\n" +
- "#else\n" +
- "#define INLINE inline __attribute__((always_inline))\n" +
- "#endif\n" +
- "#define PACKAGE_NAME \"libjpeg-turbo\"\n" +
- "#define VERSION \"1.5.1\"\n" +
- "#if (__WORDSIZE==64 && !defined(__native_client__)) || defined(_WIN64)\n" +
- "#define SIZEOF_SIZE_T 8\n" +
- "#else\n" +
- "#define SIZEOF_SIZE_T 4\n" +
- "#endif\n" +
- "EOF",
-)
-
-# jiminy cricket the way this file is generated is completely outrageous
-genrule(
- name = "configure_simd",
- outs = ["simd/jsimdcfg.inc"],
- cmd = "cat <<'EOF' >$@\n" +
- "%define DCTSIZE 8\n" +
- "%define DCTSIZE2 64\n" +
- "%define RGB_RED 0\n" +
- "%define RGB_GREEN 1\n" +
- "%define RGB_BLUE 2\n" +
- "%define RGB_PIXELSIZE 3\n" +
- "%define EXT_RGB_RED 0\n" +
- "%define EXT_RGB_GREEN 1\n" +
- "%define EXT_RGB_BLUE 2\n" +
- "%define EXT_RGB_PIXELSIZE 3\n" +
- "%define EXT_RGBX_RED 0\n" +
- "%define EXT_RGBX_GREEN 1\n" +
- "%define EXT_RGBX_BLUE 2\n" +
- "%define EXT_RGBX_PIXELSIZE 4\n" +
- "%define EXT_BGR_RED 2\n" +
- "%define EXT_BGR_GREEN 1\n" +
- "%define EXT_BGR_BLUE 0\n" +
- "%define EXT_BGR_PIXELSIZE 3\n" +
- "%define EXT_BGRX_RED 2\n" +
- "%define EXT_BGRX_GREEN 1\n" +
- "%define EXT_BGRX_BLUE 0\n" +
- "%define EXT_BGRX_PIXELSIZE 4\n" +
- "%define EXT_XBGR_RED 3\n" +
- "%define EXT_XBGR_GREEN 2\n" +
- "%define EXT_XBGR_BLUE 1\n" +
- "%define EXT_XBGR_PIXELSIZE 4\n" +
- "%define EXT_XRGB_RED 1\n" +
- "%define EXT_XRGB_GREEN 2\n" +
- "%define EXT_XRGB_BLUE 3\n" +
- "%define EXT_XRGB_PIXELSIZE 4\n" +
- "%define RGBX_FILLER_0XFF 1\n" +
- "%define JSAMPLE byte ; unsigned char\n" +
- "%define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE)\n" +
- "%define CENTERJSAMPLE 128\n" +
- "%define JCOEF word ; short\n" +
- "%define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF)\n" +
- "%define JDIMENSION dword ; unsigned int\n" +
- "%define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION)\n" +
- "%define JSAMPROW POINTER ; JSAMPLE * (jpeglib.h)\n" +
- "%define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h)\n" +
- "%define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h)\n" +
- "%define JCOEFPTR POINTER ; JCOEF * (jpeglib.h)\n" +
- "%define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW)\n" +
- "%define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY)\n" +
- "%define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE)\n" +
- "%define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR)\n" +
- "%define DCTELEM word ; short\n" +
- "%define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM)\n" +
- "%define float FP32 ; float\n" +
- "%define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(float)\n" +
- "%define ISLOW_MULT_TYPE word ; must be short\n" +
- "%define SIZEOF_ISLOW_MULT_TYPE SIZEOF_WORD ; sizeof(ISLOW_MULT_TYPE)\n" +
- "%define IFAST_MULT_TYPE word ; must be short\n" +
- "%define SIZEOF_IFAST_MULT_TYPE SIZEOF_WORD ; sizeof(IFAST_MULT_TYPE)\n" +
- "%define IFAST_SCALE_BITS 2 ; fractional bits in scale factors\n" +
- "%define FLOAT_MULT_TYPE FP32 ; must be float\n" +
- "%define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FP32 ; sizeof(FLOAT_MULT_TYPE)\n" +
- "%define JSIMD_NONE 0x00\n" +
- "%define JSIMD_MMX 0x01\n" +
- "%define JSIMD_3DNOW 0x02\n" +
- "%define JSIMD_SSE 0x04\n" +
- "%define JSIMD_SSE2 0x08\n" +
- "EOF",
-)
-
-config_setting(
- name = "k8",
- values = {"cpu": "k8"},
-)
-
-config_setting(
- name = "android",
- values = {"crosstool_top": "//external:android/crosstool"},
-)
-
-config_setting(
- name = "armeabi-v7a",
- values = {"android_cpu": "armeabi-v7a"},
-)
-
-config_setting(
- name = "arm64-v8a",
- values = {"android_cpu": "arm64-v8a"},
-)
-
-config_setting(
- name = "windows",
- values = {"cpu": "x64_windows_msvc"},
-)
diff --git a/third_party/sycl/sycl/LICENSE.text.tpl b/third_party/sycl/sycl/LICENSE.text.tpl
deleted file mode 100644
index 0c2955c4d7..0000000000
--- a/third_party/sycl/sycl/LICENSE.text.tpl
+++ /dev/null
@@ -1,268 +0,0 @@
-
----------------------------------------------------------------------
-
-SOFTWARE LICENSE AGREEMENT
-
----------------------------------------------------------------------
----------------------------------------------------------------------
-
-By downloading, installing, copying, or otherwise using the
-ComputeCpp Community Edition software, including any associated
-components, media, printed materials, and electronic documentation
-("Software"), the user agrees to the following terms and conditions
-of this Software License Agreement ("Agreement"). Please read the
-terms of this Agreement carefully before beginning your download, as
-pressing the "I AGREE" button at the end of this Agreement will
-confirm your assent. If you do not agree to these terms, then
-Codeplay Software Limited is unwilling to license the Software to
-you; so please press the "CANCEL" button to cancel your download.
-
- 1. License. Codeplay Software Ltd., a company incorporated in
- England and Wales with registered number 04567874 and having its
- registered office at Regent House, 316 Beulah Hill, London,
- United Kingdom, SE19 3HF ("Codeplay") hereby grants the user,
- free of charge, a non-exclusive worldwide license to use and
- replicate (but not modify) the Software for any use, whether
- commercial or non-commercial, in accordance with this Agreement.
- Codeplay reserves all rights to the Software that are not
- expressly granted by this Agreement.
- 2. Redistribution. The user may copy and redistribute unmodified
- copies of only those components of the Software which are
- specified below ("Redistributable Components"), in object code
- form, as part of the user’s software applications or libraries
- ("Applications"). The user acknowledges and agrees that it has no
- right to modify the Redistributable Components in any way. Any
- use of the Redistributable Components within the user’s
- Applications will continue to be subject to the terms and
- conditions of this Agreement, and the user must also distribute a
- copy of this Agreement and reproduce and include all notices of
- copyrights or other proprietary rights in the Software. The
- user’s redistribution of the Redistributable Components will not
- entitle it to any payment from Codeplay. The user may not
- transfer any of its rights or obligations under this Agreement.
-
-+-------------------------------------------+
-|Redistributable Component|File Name |
-|-------------------------+-----------------|
-|Runtime (for Linux) |libComputeCpp.so |
-|-------------------------+-----------------|
-|Runtime (for Windows) |libComputeCpp.dll|
-+-------------------------------------------+
-
- 3. Restrictions. The user shall not:
-
- a. circumvent or bypass any technological protection measures in
- or relating to the Software;
- b. use the Software to perform any unauthorized transfer of
- information or for any illegal purpose;
- c. de-compile, decrypt, disassemble, hack, emulate, exploit or
- reverse-engineer the Software (other than to the limited
- extent permitted by law);
- d. copy or redistribute any components of the Software that are
- not listed in the table of Redistributable Components;
- e. publish, rent, lease, sell, export, import, or lend the
- Software;
- f. represent in any way that it is selling the Software itself
- or any license to use the Software, nor refer to Codeplay or
- ComputeCpp within its marketing materials, without the
- express prior written permission of Codeplay.
- 4. Support. Codeplay does not provide any guarantees of support for
- the Software to the user. Codeplay will use reasonable endeavours
- to respond to users' support requests, for the most recent
- release only, via the community support website at https://
- computecpp.codeplay.com.
- 5. Intellectual Property. The Software is owned by Codeplay or its
- licensors, and is protected by the copyright laws of the United
- Kingdom and other countries and international treaty provisions.
- Codeplay (and/or its licensors, as the case may be) retains all
- copyrights, trade secrets and other proprietary rights in the
- Software, including the rights to make and license the use of all
- copies. To the extent that any patents owned by Codeplay or its
- licensors relate to any component of the Software, the licence
- granted to the user in accordance with this Agreement allows for
- the lawful use of such patents but only for the purposes of this
- Agreement and not further or otherwise. Therefore, the user may
- make no copies of the Software, or the written materials that
- accompany the Software, or reproduce it in any way, except as set
- forth above.
- 6. Terms. This Agreement is effective until terminated. Codeplay or
- the user may terminate it immediately at any time. Any violation
- of the terms of this Agreement by the user will result in
- immediate termination by Codeplay. Upon termination, the user
- must return or destroy the Software and accompanying materials
- and notify Codeplay of its actions by email to info@codeplay.com.
- 7. NO WARRANTIES. Codeplay expressly disclaims any warranty for the
- Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
- AND NON-INFRINGEMENT. IN NO EVENT SHALL CODEPLAY BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, DELICT OR TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE. In particular, Codeplay provides no guarantees of
- application performance on the target hardware.
- 8. General. The invalidity of any portion or provision of this
- Agreement shall not affect any other portions or provisions. This
- Agreement shall be governed by the laws of Scotland. This
- Agreement is the complete and exclusive agreement between the
- user and Codeplay regarding the Software, and it supersedes any
- prior agreement, oral or written, and any other communication
- between the user and Codeplay relating to the subject matter of
- the Agreement. Any amendment or modification of this Agreement
- must be in writing and signed by both parties. If the user does
- not agree to the terms of this Agreement, the user must not
- install or use the Software.
- 9. Third Party Licenses. The following licenses are for third-party
- components included in the software.
-
- a. License for Clang/LLVM compiler technology components:
-
-==============================================================================
-
-LLVM Release License
-
-==============================================================================
-
-University of Illinois/NCSA
-
-Open Source License
-
-Copyright (c) 2007-2014 University of Illinois at Urbana-Champaign.
-
-All rights reserved.
-
-Developed by:
-
- LLVM Team
-
- University of Illinois at Urbana-Champaign
-
- http://llvm.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimers.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimers in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the names of the LLVM Team, University of Illinois at
- Urbana-Champaign, nor the names of its contributors may be used to
- endorse or promote products derived from this Software without specific
- prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
-SOFTWARE.
-
-==============================================================================
-
- b. License for OpenBSD regex components:
-
-$OpenBSD: COPYRIGHT,v 1.3 2003/06/02 20:18:36 millert Exp $
-Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
-This software is not subject to any license of the American Telephone
-and Telegraph Company or of the Regents of the University of California.
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it, subject
-to the following restrictions:
-
-1. The author is not responsible for the consequences of use of this
- software, no matter how awful, even if they arise from flaws in it.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. Since few users ever read sources,
- credits must appear in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software. Since few users
- ever read sources, credits must appear in the documentation.
-
-4. This notice may not be removed or altered.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)COPYRIGHT8.1 (Berkeley) 3/16/94
- */
-
- c. License for MD5 components:
-
-/*
- * This code is derived from (original license follows):
- *
- * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
- * MD5 Message-Digest Algorithm (RFC 1321).
- *
- * Homepage:
- * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
- *
- * Author:
- * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
- *
- * This software was written by Alexander Peslyak in 2001. No copyright is
- * claimed, and the software is hereby placed in the public domain.
- * In case this attempt to disclaim copyright and place the software in the
- * public domain is deemed null and void, then the software is
- * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
- * general public under the following terms:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted.
- *
- * There's ABSOLUTELY NO WARRANTY, express or implied.
- *
- * (This is a heavily cut-down "BSD license".)
- *
- * This differs from Colin Plumb's older public domain implementation in that
- * no exactly 32-bit integer data type is required (any 32-bit or wider
- * unsigned integer data type will do), there's no compile-time endianness
- * configuration, and the function prototypes match OpenSSL's. No code from
- * Colin Plumb's implementation has been reused; this comment merely compares
- * the properties of the two independent implementations.
- *
- * The primary goals of this implementation are portability and ease of use.
- * It is meant to be fast, but not as fast as possible. Some known
- * optimizations are not included to reduce source code size and avoid
- * compile-time configuration.
- */
-
-