Skip to content

OpenMP does not accelerate all networks

Context

OpenMP is currently enforced in every export. However, it may not be always for te better as it hurts the performances of small networks like those used when running the AIDGE benchmark

We can observe the relative performance of aidge_export_cpp module with torch, onnxruntime (reference) and aidge_backend_cpu for 3 Open MP configurations in below images.

It appears that reducing the number of threads to 1 significantly improves the performances. However, deactivating OpenMP all together does not seem to futher improve performances.

1. OpenMP activated, OMP_NUM_THREADS=8

conv_openmp-on_num-threads-8.svg

2. OpenMP activated, OMP_NUM_TRHEADS=1

conv_openmp-on_num-threads-1.svg

3. OpenMP deactivated

conv_openmp-off.svg