Can i use multiple gpus in parallel

Talk about Hardware used for Deep Learning


Locked
User avatar
kiri
Posts: 3
Joined: Mon Sep 02, 2019 1:32 pm

Can i use multiple gpus in parallel

Post by kiri »

Hi

I'm new to faceswap and deep learning in general, but i managed to find some free time and since i have the hardware i thought i should try. I have 4 amd gpus. 290x 390x 580 and 5700xt. I am able to follow the tutorials just fine so far.
I still haven't finished producing any video because i noticed that PlaidML only uses 1 of my gpus and i thought that i should get it to use all my hardware before i proceed to save time.

I did google this but honestly i found no mention of multi-gpu usage with faceswap or even PlaidML anywhere. Nothing that can show me how to use more than 1 gpu but also nothing that says that i cant!

PlaidML-setup detects all my gpus but asks me to select a default gpu and then faceswap only uses that one.

So does anyone know how i can use more than 1 gpu with faceswap or is this just not possible?

Thank you in advance for any help

User avatar
kilroythethird
Posts: 20
Joined: Fri Jul 12, 2019 11:35 pm
Answers: 1
Has thanked: 2 times
Been thanked: 10 times

Re: Can i use multiple gpus in parallel

Post by kilroythethird »

Sadly multi GPU is not possible with plaidml.
There is nothing we can really do about. Its a limitation of plaidml at the moment.

that amd guy

User avatar
bryanlyon
Site Admin
Posts: 793
Joined: Fri Jul 12, 2019 12:49 am
Answers: 44
Location: San Francisco
Has thanked: 4 times
Been thanked: 218 times
Contact:

Re: Can i use multiple gpus in parallel

Post by bryanlyon »

Just to add, even in nvidia cards, multi gpu support requires matching (or at least almost matching) gpus. You won't want to try multi gpu with an eclectic mix of random gpus.

User avatar
kiri
Posts: 3
Joined: Mon Sep 02, 2019 1:32 pm

Re: Can i use multiple gpus in parallel

Post by kiri »

Thank you for your reply, it is actually as i suspected!
One more question just out of curiosity. if i had 2 or more different videos that i want to create, would it be possible to: for example use 1 gpu to extract the faces for video A while im using a second gpu to train/extract faces for video B?
I see that i cant launch multiple instances of faceswap but im thinking i might be possible with command line?

User avatar
kilroythethird
Posts: 20
Joined: Fri Jul 12, 2019 11:35 pm
Answers: 1
Has thanked: 2 times
Been thanked: 10 times

Re: Can i use multiple gpus in parallel

Post by kilroythethird »

If you have enough free vram you can for sure run two faceswap instances simultaneously with the plaidml backend.
Using different cards in each faceswap instance should also work.
Simply running plaidml-setup, then starting the first faceswap process, plaidml-setup again and the other process should work.
Additionally there is probably some environment variable you can set to get plaidml to use a specific GPU (not sure tho).

If you are using windows you might need to set the logfile for the different faceswap instances.

that amd guy

User avatar
kiri
Posts: 3
Joined: Mon Sep 02, 2019 1:32 pm

Re: Can i use multiple gpus in parallel

Post by kiri »

Ok i understand (i am using windows). Thank you for the clarifications!
Thats all i needed to know, you have been very helpful. I will keep experimenting.

User avatar
kilroythethird
Posts: 20
Joined: Fri Jul 12, 2019 11:35 pm
Answers: 1
Has thanked: 2 times
Been thanked: 10 times

Re: Can i use multiple gpus in parallel

Post by kilroythethird »

Please let us know how it goes.
Would definitely be interesting.

that amd guy

Locked