AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.77k stars 7.96k forks source link

Cannot use all the physical CPU sockets #2749

Open lf-openthos opened 5 years ago

lf-openthos commented 5 years ago

My server have 4 physical CPU (xeon 8280L) with 28 cores each. Whe darknet run with this parameter

darknet_no_gpu.exe detector demo data/coco.data cfg/yolov3.cfg yolov3.weights -c 0

Only ONE physical CPU and its 28 cores are full loaded, the other 3 physical CPU remain idle. Any comments?

AlexeyAB commented 5 years ago

@lf-openthos

Try to do before runing Darknet.

export OMP_NUM_THREADS=112
export KMP_AFFINITY=verbose,scatter

Also try to add here: https://github.com/AlexeyAB/darknet/blob/7b1ef39607047b4bcd01c450b0ead002c5148bb1/src/gemm.c#L753 omp_set_num_threads(112);