Disabling "CPU Baseline Flags"

asked 2020-01-09 08:01:23 -0600

I've been tasked with porting a computer vision suite that leverages OpenCV to a PPC-based single-board computer running VxWorks. My OpenCV build fails at the step where baseline CPU flags are tested. The processor is older, and does not seem to have any standard vector instruction sets (SSE, NEON, AVX etc). Is there any way to remove this test, on the assumption that performance will be VERY slow, as a proof of concept? This would be leverage for my project to move towards a more fully featured CPU to hit the performance targets.

Thanks in advance! J

-- Performing Test HAVE_CPU_BASELINE_FLAGS

-- Performing Test HAVE_CPU_BASELINE_FLAGS - Failed

CMake Error at cmake/OpenCVCompilerOptimizations.cmake:524 (message):

Compiler doesn't support baseline optimization flags:

Call Stack (most recent call first):

cmake/OpenCVCompilerOptions.cmake:268 (ocv_compiler_optimization_options)

CMakeLists.txt:703 (include)

edit retag flag offensive close merge delete

Comments

I think that full list is here. Now I hope you can disable all optimization using -D CPUBASELINE= .in cmake command line

LBerger gravatar imageLBerger ( 2020-01-09 08:17:45 -0600 )edit

Could you please clarify for me: is your recommendation to modify the .cmake file to remove those optimizations, or to send an empty value for "-D CPUBASELINE=" in the cmake call?

Thanks for your quick input!

JonesyMalone gravatar imageJonesyMalone ( 2020-01-09 08:37:55 -0600 )edit

I hope so and may be it should disable cmake/OpenCVCompilerOptimizations.cmake I'm not sure of this

LBerger gravatar imageLBerger ( 2020-01-09 08:39:44 -0600 )edit

There is a CMake flag: CV_DISABLE_OPTIMIZATION.

It should disable IPP, OpenCL, Eigen, Lapack, dispatched SIMD code, ...

Probably the only remaining optimization is multithreading (to be checked)?

Eduardo gravatar imageEduardo ( 2020-01-09 10:57:58 -0600 )edit