tensorflow / runtime

A performant and modular runtime for TensorFlow
Apache License 2.0
757 stars 124 forks source link

HOW to build TFRT for AMD GPU? #109

Closed FullZing closed 1 year ago

chsigg commented 2 years ago

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).

I hope this helps.

FullZing commented 1 year ago

THANKS