Train models using AMD Radeon GPUs

Did anyone had luck using GPUs from AMD on rasa train? I see it is possible using tensorflow-rocm (nice Medium article here), and I was always annoyed about this CUDA warnings since I don’t have an NVidia GPU (I also know NVidia is majority here but Radeon is getting up to speed with GPU game also).

Hey, thanks for the question. Until tensorflow supports it in their official package it will be difficult to support it inside Rasa Open Soure. If you are curious to try it out, you can install Rasa Open Source from source and then install tensorflow-rocm. I think that should work.

In fact tensorflow works out-of-the-box with Radeon GPUs as soon as you install tensorflow-rocm. Only catch is that rocm supports limited versions of Linux distributions (but I managed to make it work on Ubuntu 20.10 which is unsupported for instance).

What would happen if you have the native tensorflow package and tensorflow-rocm package installed. My guess is that they will clash and that would be a problem. That’s why may be you can first try installing Rasa with pip install and then install tensorflow-rocm. You might need to explicitly uninstall the native tensorflow package in between the two installs.

I didn’t see them clashing but I did install tensorflow-rocm after rasa. The documentation is not very clear, but from what I understand tensorflow-rocm works in a plugin fashion as it can be installed alongside tensorflow itself. I could be wrong, didn’t deep-dived the code, just put effort on making training run for now.