Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use multiple gpus? #12

Open
mzshuo opened this issue May 20, 2021 · 3 comments
Open

How to use multiple gpus? #12

mzshuo opened this issue May 20, 2021 · 3 comments

Comments

@mzshuo
Copy link

mzshuo commented May 20, 2021

I set the argument '--mGPUs' but the model still only used one gpu.
And I checked the 'generate_tsv.py' code and found variable '--mGPUs' is not used except setting.
Does anyone face the same problem?

@Alchemistyui
Copy link

I want to know too... Did you solve it?

@mzshuo
Copy link
Author

mzshuo commented May 27, 2021

@Alchemistyui

Yes. I split the dataset to 4 folds and feed them to the model separately using 4 different gpu set manually.

Specifically, add this line at the head of python file.
import os
os.environ["CUDA_VISIBLE_DEVICES"] = args.gpu

@Alchemistyui
Copy link

@shuorr Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants