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:
parent
5e2cace1a6
commit
fa2687fe9e
third_party
3
third_party/gpus/cuda/build_defs.bzl.tpl
vendored
3
third_party/gpus/cuda/build_defs.bzl.tpl
vendored
@ -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,
|
||||
})
|
||||
|
||||
|
4
third_party/nccl/build_defs.bzl.tpl
vendored
4
third_party/nccl/build_defs.bzl.tpl
vendored
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user