Switch from @local_config_cuda//cuda:using_cuda_{clang,nvcc} to @local_config_cuda//:is_cuda_enabled.

Switch code in non-tf, oss-only repositories. TF has its own alias //tensorflow:is_cuda_enabled, and code in the TF repository should use that.

PiperOrigin-RevId: 360681082
Change-Id: I9334609ef5b3c29fd032ad3f40b824d42793a4b9
This commit is contained in:
Christian Sigg 2021-03-03 08:54:58 -08:00 committed by TensorFlower Gardener
parent 5e2cace1a6
commit fa2687fe9e
2 changed files with 3 additions and 4 deletions
third_party

View File

@ -7,8 +7,7 @@ def if_cuda(if_true, if_false = []):
"""
return select({
"@local_config_cuda//cuda:using_nvcc": if_true,
"@local_config_cuda//cuda:using_clang": if_true,
"@local_config_cuda//:is_cuda_enabled": if_true,
"//conditions:default": if_false,
})

View File

@ -46,13 +46,13 @@ def _rdc_copts():
maxrregcount = "-maxrregcount=96"
return cuda_default_copts() + select({
"@local_config_cuda//cuda:using_nvcc": [
"@local_config_cuda//:is_cuda_compiler_nvcc": [
"-nvcc_options",
"relocatable-device-code=true",
"-nvcc_options",
"ptxas-options=" + maxrregcount,
],
"@local_config_cuda//cuda:using_clang": [
"@local_config_cuda//:is_cuda_compiler_clang": [
"-fcuda-rdc",
"-Xcuda-ptxas",
maxrregcount,