`num_processes == 1` even when I set it to `--num_processes 2`
I have a Python script that I’m running with HuggingFace Accelerate. I also have a total of 4 GPUs but only wish to use 2. The command I’m running looks like this:accelerate launch --num_processes 2 script.py. However, whenever I run it this way, it says that thenum_processesis 1. It seems as of now that I can only use either all of the GPUs or 1. Is there anything that I’m doing wrong or should look into further?
2023-05-17T11:25:00Z
Try passing in--multi_gpuas well
2023-05-17T14:15:22Z
I tried that and it didn’t work. It also wouldn’t make sense though, would it? Not passing any argument makes the process grab all of the GPUs by default, so I don’t understand how specifying the number of processes would change that.
2023-05-17T14:25:01Z
Can you provide the output ofnvidia-smi, and the full output of just doingaccelerate launch myscript.py?
2023-05-18T09:21:16Z
Funny, now when I tried passing--multi_gpuas well again, it seems to be working. Not sure what went wrong before but I assume this is how you do it.Do you know if there’s a reason why--multi_gpuis not set to True by default?
2023-05-18T11:51:47Z
seanswyi:Do you know if there’s a reason why--multi_gpuis not set to True by default?Nope, going to be looking into enabling it