Using OpenMP can improve the performance of YOLO, but turning on this option on macOS High Sierra 10.13 will cause the compilation process to fail. This article was written on 2020-12-02.
First, you need install openmp
1 |
brew install libomp |
If you the following error is still displayed.
1 |
'omp.h' file not found |
Then, edit the Makefile
Find
1 |
COMMON= -Iinclude/ -I3rdparty/stb/include |
Replace with
1 |
COMMON= -Iinclude/ -I3rdparty/stb/include -I/usr/local/include |
Find
1 |
LDFLAGS+= -lgomp |
Replace with
1 |
LDFLAGS+= -L/usr/local/lib -lomp |