Is your feature request related to a problem? Please describe.
Currently, native CPU code compilation passes -march=native to the compiler which will cause issues if the target-machine != the machine on which we compile our Haskell program. This causes illegal instructions to be inserted.
Describe the solution you'd like
I see three possibilities:
- Make a variant of
runQ that is parametric on target information
- Build multiple executable binaries for multiple performance-affecting feature flag variants (i.e. build plain ARM64 binary and also ARM64+SVE binary and also ARM64+SVE+SME, etc.) and gate choice of binary at run-time with target information
- Simply compile
runQ code with exactly the same level of target-specificity as GHC was provided when the program was itself built. If GHC was compiled with -march=native then it should be safe to use -march=native on our Accelerate code too.
Is your feature request related to a problem? Please describe.
Currently, native CPU code compilation passes
-march=nativeto the compiler which will cause issues if the target-machine != the machine on which we compile our Haskell program. This causes illegal instructions to be inserted.Describe the solution you'd like
I see three possibilities:
runQthat is parametric on target informationrunQcode with exactly the same level of target-specificity as GHC was provided when the program was itself built. If GHC was compiled with-march=nativethen it should be safe to use-march=nativeon our Accelerate code too.