tensorflow / runtime

A performant and modular runtime for TensorFlow
Apache License 2.0
756 stars 123 forks source link

rules_cuda impacts all the cc targets #104

Open xhuaoe opened 2 years ago

xhuaoe commented 2 years ago

Hi,

I am using bazel and there's cuda code and c++ code in the repo. IIUC rules_cuda patches rules_cc and changes some settings. Such changes apply to all the cc targets, not only cuda targets after we run rules_cc_toolchains().

Is it possible to limit the impact only to cuda_library without touching cc targets? I am currently encountering an issue of --features=external_include_paths not working since it's missing in the cc toolchain patched by rules_cuda. More generally, it would be great if rules_cc can be purely some implementation detail of rules_cuda / cuda_library without anything "leaking" outside cuda targets.

cloudhan commented 2 years ago

Then you need my pure starlark implementation https://github.com/cloudhan/rules_cuda