Skip to content

Commit

Permalink
enh: run set_num_interop_threads(1) for torchmpo segmenter
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jun 14, 2024
1 parent d7c7d09 commit 002003e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.23.4
- enh: run set_num_interop_threads(1) for torchmpo segmenter
0.23.3
- fix: ignore non-file-type-like basins
- fix: workaround for slow reading from HDF5 (don't use index arrays)
Expand Down
1 change: 1 addition & 0 deletions src/dcnum/segm/segm_torch/segm_torch_mpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def segment_algorithm(image, *,
# all the multiprocessing.
# https://pytorch.org/docs/stable/generated/torch.set_num_threads.html#torch.set_num_threads
torch.set_num_threads(1)
torch.set_num_interop_threads(1)
device = torch.device("cpu")

# Load model and metadata
Expand Down

0 comments on commit 002003e

Please sign in to comment.