Train on AMD GPU - MacOS

Hi!

I have a slight problem with training RASA using GPU acceleration on my MacOS with AMD GPU. Rasa train is working as it should, but it is clear, that GPU is not used (it takes much longer time, then on my PC, where I have NVIDIA GPU and CUDA installed).

I am not really sure how should I setup everything to utilize AMD GPU (I know how to run tensorflow on AMD GPU using PlaidML, but… Is there any way to pass this information into RASA training?).

Thanks in advance for any clues!

Hi @BarMin - are you able to run any tensorflow example code utilising GPU? If TF can use it, Rasa should be able to as well.

Well… I can run Tensorflow examples, but with mentioned PlaidML.

link: GitHub - plaidml/plaidml: PlaidML is a framework for making deep learning work everywhere.

I guess that I should somehow export os.environ[“KERAS_BACKEND”] = “plaidml.keras.backend” and force RASA to recognize it? Or export itself will fix that. I will check this out :slight_smile:

Unfortunately, this solution doesn’t work. I wrote a python script in which:

from rasa.model_training import train

os.environ["KERAS_BACKEND"] = "plaidml.keras.backend"

if __name__ == '__main__':
   train(config="./config.yml", domain="./domain.yml", training_files="./data")

Not really sure what else can be done in order to successfully train RASA on AMD GPU in MacOS.

PS. Tensorflow examples from PlaidML works fine on GPU.

Anyone has some other ideas? :slight_smile: Or MacOS with AMD is useless in terms of RASA training?

Hi @BarMin! Have you found a solution for this topic?