diff --git a/utils/general.py b/utils/general.py index 3044b9c1ae78..d1594a8b5cea 100755 --- a/utils/general.py +++ b/utils/general.py @@ -45,6 +45,7 @@ pd.options.display.max_columns = 10 cv2.setNumThreads(0) # prevent OpenCV from multithreading (incompatible with PyTorch DataLoader) os.environ['NUMEXPR_MAX_THREADS'] = str(NUM_THREADS) # NumExpr max threads +os.environ['OMP_NUM_THREADS'] = str(NUM_THREADS) # OpenMP max threads (PyTorch and SciPy) def is_kaggle():