Default `OMP_NUM_THREADS=8` (#6770)
Browse files- utils/general.py +1 -0
utils/general.py
CHANGED
@@ -45,6 +45,7 @@ np.set_printoptions(linewidth=320, formatter={'float_kind': '{:11.5g}'.format})
|
|
45 |
pd.options.display.max_columns = 10
|
46 |
cv2.setNumThreads(0) # prevent OpenCV from multithreading (incompatible with PyTorch DataLoader)
|
47 |
os.environ['NUMEXPR_MAX_THREADS'] = str(NUM_THREADS) # NumExpr max threads
|
|
|
48 |
|
49 |
|
50 |
def is_kaggle():
|
|
|
45 |
pd.options.display.max_columns = 10
|
46 |
cv2.setNumThreads(0) # prevent OpenCV from multithreading (incompatible with PyTorch DataLoader)
|
47 |
os.environ['NUMEXPR_MAX_THREADS'] = str(NUM_THREADS) # NumExpr max threads
|
48 |
+
os.environ['OMP_NUM_THREADS'] = str(NUM_THREADS) # OpenMP max threads (PyTorch and SciPy)
|
49 |
|
50 |
|
51 |
def is_kaggle():
|