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

Document how to check that the GPU is used #256

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ However, the GitHub API is limited to maximum 60 requests per hour per IP addres
Consequently, if Casanovo has been executed multiple times already, it might temporarily not be able to communicate with GitHub.
You can avoid this error by explicitly specifying the model file using the `--model` parameter.

**Casanovo is very slow even when running on the GPU. How can I speed it up?**

It is highly recommended to run Casanovo on the GPU to get the maximum performance.
If Casanovo is slow despite that your system has a GPU, the GPU might not be configured correctly for Casanovo.
A quick test to verify that Casanovo is using your (CUDA-enabled) GPU is to run `watch nvidia-smi` in your terminal.
If Casanovo has access to the GPU, you should see it listed in the bottom process table and the "Volatile GPU-Util" column at the top right should show activity while Casanovo is processing the data.

If Casanovo is not listed in the `nvidia-smi` output, it is not using your GPU.
This is commonly caused by an incompatibility between your NVIDIA drivers and Pytorch.
Although Pytorch is installed automatically when installing Casanovo, in this case we recommend to reinstall it manually according to the following steps:

1. Uninstall the current version of Pytorch: `pip uninstall torch`
2. Install the latest version of the NVIDIA drivers using the [official CUDA Toolkit](https://developer.nvidia.com/cuda-downloads). If supported by your system, an easy alternative can be conda using `conda install -c nvidia cuda-toolkit`.
3. Install the latest version of Pytorch according to the [instructions on the Pytorch website](https://pytorch.org/get-started/locally/).

Try to run Casanovo again and use `watch nvidia-smi` to inspect whether it can use the GPU now.
If this is still not yet the case, please [open an issue on GitHub](https://github.com/Noble-Lab/casanovo/issues/new).
Include full information about your system set-up, the installed CUDA toolkit and Pytorch versions, and the troubleshooting steps you have performed.

**I get a "CUDA out of memory" error when trying to run Casanovo. Help!**

This means that there was not enough (free) memory available on your GPU to run Casanovo, which is especially likely to happen when you are using a smaller, consumer-grade GPU.
Expand Down
Loading