Skip to content

Commit

Permalink
Default OMP_NUM_THREADS=8 (ultralytics#6770)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Feb 24, 2022
1 parent 814caa9 commit 905c0f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 905c0f1

Please sign in to comment.