Skip to content

Commit

Permalink
Disable multithreading for MPS backend (#144)
Browse files Browse the repository at this point in the history
* No multiprocessing on Apple MPS

Fixes #109.

* Document that Linux + GPU is recommended
  • Loading branch information
bittremieux authored Apr 3, 2023
1 parent 62c226e commit 8e491d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion casanovo/denovo/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def _get_devices(no_gpu: bool) -> Union[int, str]:
"""
if not no_gpu and any(
operator.attrgetter(device + ".is_available")(torch)()
for device in ["cuda", "backends.mps"]
for device in ("cuda",)
):
return -1
elif not (n_workers := utils.n_workers()):
Expand Down
9 changes: 9 additions & 0 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ Not all releases might have a model file included on the [Releases page](https:/

## Running Casanovo

```{note}
We recommend a Linux system with a dedicated GPU to achieve optimal runtime performance.
Notably, Casanovo is restricted to single-threaded execution only on Windows and MacOS.
```

> **Warning**
> Casanovo can currently crash if no GPU is available.
> We are actively trying to fix this known issue.
### Sequence new mass spectra

To sequence your own mass spectra with Casanovo, use the `denovo` mode:
Expand Down

0 comments on commit 8e491d9

Please sign in to comment.