You don't need any special flags to build the tfrt_cc_binary targets under //backends/gpu/....
Those contain only host code for GPUs, and the same binary dynamically loads and calls both ROCm and CUDA libraries.
Only the cuda_library targets contain GPU device code and won't build for AMD GPUs. The tfrt_cc_binary targets under //backends/gpu/... don't depend on these, but tools like bef_executor do if you bazel build with --//:enable_gpu. If you don't have the CUDA SDK installed on your machine, leave //:enable_gpu disabled (which is the default).
You don't need any special flags to build the tfrt_cc_binary targets under
//backends/gpu/...
. Those contain only host code for GPUs, and the same binary dynamically loads and calls both ROCm and CUDA libraries.Only the
cuda_library
targets contain GPU device code and won't build for AMD GPUs. Thetfrt_cc_binary
targets under//backends/gpu/...
don't depend on these, but tools likebef_executor
do if youbazel build
with--//:enable_gpu
. If you don't have the CUDA SDK installed on your machine, leave//:enable_gpu
disabled (which is the default).I hope this helps.