minh9972t12 commited on
Commit
403fdd5
·
1 Parent(s): 7f8e169

Update src/detection.py

Browse files
Files changed (1) hide show
  1. src/detection.py +1 -1
src/detection.py CHANGED
@@ -169,7 +169,7 @@ class YOLOv11Detector:
169
  # These should ideally be set before importing onnxruntime, but we set them anyway
170
  os.environ['OMP_NUM_THREADS'] = str(intra_threads)
171
  os.environ['OMP_WAIT_POLICY'] = 'ACTIVE' # Don't yield CPU, faster inference
172
- os.environ['OMP_NESTED'] = '0' # Disable nested parallelism
173
  # For Intel CPUs: compact affinity for better cache usage
174
  os.environ['KMP_AFFINITY'] = 'granularity=fine,compact,1,0'
175
 
 
169
  # These should ideally be set before importing onnxruntime, but we set them anyway
170
  os.environ['OMP_NUM_THREADS'] = str(intra_threads)
171
  os.environ['OMP_WAIT_POLICY'] = 'ACTIVE' # Don't yield CPU, faster inference
172
+ os.environ['OMP_MAX_ACTIVE_LEVELS'] = '1' # Tương đương disable nested parallelism (max levels = 1)
173
  # For Intel CPUs: compact affinity for better cache usage
174
  os.environ['KMP_AFFINITY'] = 'granularity=fine,compact,1,0'
175