trackreco / mkFit

Vectorized, Parallelized Tracking
https://trackreco.github.io/
Apache License 2.0
17 stars 15 forks source link

Put conditions for headers depending on the architecture #240

Open mrodozov opened 5 years ago

mrodozov commented 5 years ago

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: https://github.com/cms-sw/cmsdist/pull/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 https://github.com/AIDASoft/DD4hep/pull/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 commented 5 years ago

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 commented 5 years ago

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

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