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

Put conditions for headers depending on the architecture #240

Open
mrodozov opened this issue Aug 28, 2019 · 2 comments
Open

Put conditions for headers depending on the architecture #240

mrodozov opened this issue Aug 28, 2019 · 2 comments

Comments

@mrodozov
Copy link

MkFit as it is builds only on Intel architectures, yet at CMS we also have non production ARM and PowerPC builds. To bring MkFit also into this non prod builds I introduced some hacks here:
cms-sw/cmsdist#5174
which does two things:

  1. Substitutes immintrin.h with whats available on that arch/machine
  2. Change some calls not available on non Intel archs with whatever I though was appropriate (although I'm not sure if it is)

For the headers substitutes we proposed similar changes in other repos (see this example AIDASoft/DD4hep#496) which looks something like :

#if defined(__powerpc64__) 
#include <ppc_header.h>

etc i.e. using preprocessor directives to include whats needed.
Can we have something like this in the files including immintrin.h ?
And proper substitutes for the mmintel_stuff calls, since I'm not sure they are appropriate now.

Thank you,
Mircho

@slava77
Copy link
Collaborator

slava77 commented Aug 28, 2019

most of the updates in cms-sw/cmsdist#5174 are apparently related to the intel intrinsics.
There is a USE_INTRINSICS flag accessible for the makefile in command line (or environment). It seems like the problem is that not all of the intrinsics are covered by this flag.
I think that initially for the ppc and aarch we can just not use the intrinsics; although something better is always welcome.

@smuzaffar
Copy link

smuzaffar commented Aug 28, 2019

we are now trying out a simple patch to build mkfit for non-x86_64 archs. Patch is available here https://github.com/cms-sw/cmsdist/pull/5179/files#diff-b996bc38d41188ee072f517d8691432e .
Basically we

  • build with -sdt=c++1z
  • use allign_alloc (available in c++11) instead of _mm_malloc
  • use free instead of _mm_free
  • use __buildin_prefetch instead of _mm_prefetch

These changes allowed us to build it for ARM and Power PC.

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