-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
For some experiments, I used libf0.swipe in a multiprocessing pipeline to compute pitch estimates for multiple audio files in parallel.
I noticed that libf0.swipe consumes all CPU power on our Linux server. This is due to some NumPy functions that perform multiprocessing for calculations.
To regulate NumPy, I did something like this in my user code:
import os
# Set the number of threads for OpenMP
os.environ['OMP_NUM_THREADS'] = '1'
# Set the number of threads for MKL
os.environ['MKL_NUM_THREADS'] = '1'
# Optionally, set the number of threads for NumExpr if you're using it
os.environ['NUMEXPR_NUM_THREADS'] = '1'
# Your NumPy code goes here
import numpy as npI'm not sure if this should be part of the library or mentioned in the README.md?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels