Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling hpipm on Arm #152

Open
manumerous opened this issue Sep 27, 2023 · 3 comments
Open

Compiling hpipm on Arm #152

manumerous opened this issue Sep 27, 2023 · 3 comments

Comments

@manumerous
Copy link

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 manumerous changed the title Compiling hpipm on arm Compiling hpipm on Arm Sep 27, 2023
@giaf
Copy link
Owner

giaf commented Sep 30, 2023

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?

@ZhengCanlun
Copy link

I have the same issue here, even set the target into GENERIC, it gose into d_core_qp_ipm_avx_avx.c. Still has the similar issue: fatal error: mmintrin.h: No such file or directory

@giaf
Copy link
Owner

giaf commented Oct 27, 2024

Hi, again this is a strange error, when TARGET is set to GENERIC the _avx files are not supposed to be compiled https://github.com/giaf/hpipm/blob/master/CMakeLists.txt#L252
Are you compiling HPIPM as part of another project? If so, maybe TARGET is overwritten by some setting from a parent build system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants