-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Allowing cpus to be set annd used in run_alphafold.py #358
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
Conversation
… in this case), Adding cpu in hhsearch, hhblits, jackhmmer and hmmersearch wrappers as well as in the main call, add n_cpu to pipeline.DataPipeline and pipeline_multimer and adjust jackhmmer and hhblits to accept said attribute
Thanks for the PR - I was looking to do something similar. It looks like --cpus is not propagated to the hhblits step, i.e. line 377 of run_alphafold.py (so it's always the default of 4). On my system, I find that dedicating more cpus to this step brings significant improvements. |
Hi, thanks for this PR, I will take a look. @jshleap I am wondering about the TF CPU -> GPU switch -- we use TF only in bits of the data pipeline where running on GPU doesn't really help, so actually switching to TF GPU should not make running AlphaFold any faster. Did you observe any speedups when changing it? @ma595 What kind of speedups did you observe with n_cpu > 4 and what number did you use? |
@Augustin-Zidek you mean in the requirements? newer versions of tensorflow don't need to be hardcoded. TF will check if a GPU is available and will use it and will default to CPU if not. |
Yes, I mean in |
Yeah, and what I am saying is that there is no need for the -cpu as TF will take advantage of GPU if one otherwise defaults to CPU. What I mean is that the tensortflow wheels ship now as generic wheels, so there is no need to add the -cpu. TF supports both cpu and gpu since v2.0.0 (https://www.tensorflow.org/install/pip#tensorflow-2-packages-are-available). |
'Relax on GPU can be much faster than CPU, so it is ' | ||
'recommended to enable if possible. GPUs must be available' | ||
' if this setting is enabled.') | ||
flags.DEFINE_boolean('cpus', 8, 'Number of cpus/threads to use') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this can be a boolean. Should be integer right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flags.DEFINE_boolean('cpus', 8, 'Number of cpus/threads to use') | |
flags.DEFINE_integer('cpus', 8, 'Number of cpus/threads to use') |
What is the status of this PR that would be very useful? |
Addresses the following pull request: * #358 PiperOrigin-RevId: 810894445 Change-Id: Ib424b3f331c5168f4505edd154b860420e89237e
This has been fixed in 4b81ad9. Thanks for reporting. |
Change requirements so that TF is both cpu and gpu enabled
Set a default for use_gpu_relax that would not fail in the run (False in this case)
Adding cpu in hhsearch, hhblits, jackhmmer and hmmersearch wrappers as well as in the main call, add n_cpu to pipeline.DataPipeline and pipeline_multimer and adjust jackhmmer and hhblits to accept said attribute