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

[Doc] Describe how to manage multithreading #1045

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ FAQ
to run, depending on computer hardware specifications. Cellpose will take a long time to run on large images.
Using hardware with a faster CPU and with more available memory will speed up the process. Using a GPU will
also speed up the process, especially if you are training with a large dataset.


**Q: How can I control the amount of threads cellpose is using?**

Under the hood, Cellpose is using PyTorch for parallelization. Number of threads for PyTorch can be set
using `torch.set_num_threads <https://pytorch.org/docs/stable/generated/torch.set_num_threads.html>`_ or through the environment
variables ``OMP_NUM_THREADS`` or ``MKL_NUM_THREADS`` as described
`here <https://pytorch.org/docs/stable/threading_environment_variables.html>`_.