aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--third_party/gpus/cuda/BUILD6
-rw-r--r--tools/bazel.rc.template1
2 files changed, 4 insertions, 3 deletions
diff --git a/third_party/gpus/cuda/BUILD b/third_party/gpus/cuda/BUILD
index fa29fde449..bf7ad7662a 100644
--- a/third_party/gpus/cuda/BUILD
+++ b/third_party/gpus/cuda/BUILD
@@ -10,14 +10,14 @@ package(default_visibility = ["//visibility:public"])
config_setting(
name = "cuda_crosstool_condition",
- values = {"crosstool_top": "//third_party/gpus/crosstool"},
+ values = {"define": "using_cuda=true"},
visibility = ["//visibility:public"],
)
config_setting(
name = "using_gcudacc",
values = {
- "crosstool_top": "//third_party/gpus/crosstool",
+ "define": "using_cuda=true",
"copt": "--use_gcudacc",
},
visibility = ["//visibility:public"],
@@ -26,7 +26,7 @@ config_setting(
config_setting(
name = "using_nvcc",
values = {
- "crosstool_top": "//third_party/gpus/crosstool",
+ "define": "using_cuda=true",
"copt": "--use_nvcc",
},
)
diff --git a/tools/bazel.rc.template b/tools/bazel.rc.template
index 5bdc9884e8..e90ec790fd 100644
--- a/tools/bazel.rc.template
+++ b/tools/bazel.rc.template
@@ -1,4 +1,5 @@
build:cuda --crosstool_top=//third_party/gpus/crosstool
+build:cuda --define=using_cuda=true
build --force_python=py$PYTHON_MAJOR_VERSION
build --python$PYTHON_MAJOR_VERSION_path=$PYTHON_BINARY