From c161557563c7a210eca73abefad610a6b38b351a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 25 Feb 2022 00:09:14 +0100 Subject: [PATCH] Default `OMP_NUM_THREADS=8` (#6770) --- utils/general.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/general.py b/utils/general.py index 3044b9c..d1594a8 100755 --- a/utils/general.py +++ b/utils/general.py @@ -45,6 +45,7 @@ np.set_printoptions(linewidth=320, formatter={'float_kind': '{:11.5g}'.format}) 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():