aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/sycl/sycl
diff options
context:
space:
mode:
authorGravatar Yifei Feng <yifeif@google.com>2017-11-22 13:42:21 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-22 13:50:02 -0800
commitb1d8c59e9b014b527fb2fbef9ce9afc14dbc4938 (patch)
treeaf207d5a90f3176bdd3fbffbe1e98258125bf389 /third_party/sycl/sycl
parente219aeb542779d90a582ffe16f8602cd1b275b22 (diff)
Merge changes from github.
PiperOrigin-RevId: 176695926
Diffstat (limited to 'third_party/sycl/sycl')
-rwxr-xr-xthird_party/sycl/sycl/BUILD.tpl17
-rwxr-xr-xthird_party/sycl/sycl/build_defs.bzl.tpl17
2 files changed, 30 insertions, 4 deletions
diff --git a/third_party/sycl/sycl/BUILD.tpl b/third_party/sycl/sycl/BUILD.tpl
index 6cad190630..b6ceaadda7 100755
--- a/third_party/sycl/sycl/BUILD.tpl
+++ b/third_party/sycl/sycl/BUILD.tpl
@@ -10,16 +10,27 @@ package(default_visibility = ["//visibility:public"])
exports_files(["LICENSE.text"])
config_setting(
- name = "using_sycl",
- values = {
- "define": "using_sycl=true",
+ name = "using_sycl_ccpp",
+ define_values = {
+ "using_sycl": "true",
+ "using_trisycl": "false",
},
)
+config_setting(
+ name = "using_sycl_trisycl",
+ define_values = {
+ "using_sycl": "true",
+ "using_trisycl": "false",
+ },
+)
+
+
cc_library(
name = "sycl_headers",
hdrs = glob([
"**/*.h",
+ "**/*.hpp",
]),
includes = [".", "include"],
)
diff --git a/third_party/sycl/sycl/build_defs.bzl.tpl b/third_party/sycl/sycl/build_defs.bzl.tpl
index 09bef0a661..33386f8957 100755
--- a/third_party/sycl/sycl/build_defs.bzl.tpl
+++ b/third_party/sycl/sycl/build_defs.bzl.tpl
@@ -5,9 +5,24 @@ def if_sycl(if_true, if_false = []):
Returns a select statement which evaluates to if_true if we're building
with SYCL enabled. Otherwise, the select statement evaluates to if_false.
+ If we are building with triSYCL instead of ComputeCPP, a list with
+ the first element of if_true is returned.
+ """
+ return select({
+ "@local_config_sycl//sycl:using_sycl_ccpp": if_true,
+ "@local_config_sycl//sycl:using_sycl_trisycl": if_true[0:1],
+ "//conditions:default": if_false
+ })
+
+def if_ccpp(if_true, if_false = []):
+ """Shorthand for select()'ing if we are building with ComputeCPP.
+ Returns a select statement which evaluates to if_true if we're building
+ with ComputeCPP enabled. Otherwise, the select statement evaluates
+ to if_false.
"""
return select({
- "@local_config_sycl//sycl:using_sycl": if_true,
+ "@local_config_sycl//sycl:using_sycl_ccpp": if_true,
+ "@local_config_sycl//sycl:using_sycl_trisycl": if_false,
"//conditions:default": if_false
})