hpipm icon indicating copy to clipboard operation
hpipm copied to clipboard

Compiling hpipm on Arm

Open manumerous opened this issue 1 year ago • 1 comments

Hi,

I am trying to compile hpipm on Arm (specifically the 8-core Arm® Cortex®-A78AE v8.2 64-bit CPU ).

When Switching to the generic non AVX target in the CmakeLists.txt using set(TARGET GENERIC CACHE STRING "Set CPU architecture target") the solver fails inside d_core_qp_ipm_aux_avx.c due to the following imports:

#include <mmintrin.h>
#include <xmmintrin.h>  // SSE
#include <emmintrin.h>  // SSE2
#include <pmmintrin.h>  // SSE3
#include <smmintrin.h>  // SSE4
#include <immintrin.h>  // AVX

I was wondering why in the generic non AVX build an AXV specific file with AVX specific imports ( If I am not mistaken) is included?

Furthermore i would be interested to know if builds on arm are supported? Am i maybe missing something?

Any help is appreciated.

manumerous avatar Sep 27 '23 14:09 manumerous

Hi, your issue is a bit strange. Yes builds on ARM are supported, and choosing GENERIC TARGET in HPIPM is not supposed to compile d_core_qp_ipm_aux_avx.c but instead d_core_qp_ipm_aux.c, that has no dependency on x86 instructions https://github.com/giaf/hpipm/blob/master/CMakeLists.txt#L248

Can you double check that the issue is not due to some local change on your side?

giaf avatar Sep 30 '23 07:09 giaf