Skip to content

Document usage of architecture dependent compiler flags #13

Open

Description

@robertodr

We have -march=native enabled by default for GCC (and similar flags for other compilers, see CXXFlags.cmake) but this is dangerous if compilation and execution architectures are different (e.g. compile on old Intel, execute on new AMD)

Indeed the binary wheel is NOT produced with any of these flags enabled.

  1. What should the default behavior be? On or off?
  2. Whatever the default behavior, it has to be documented.

Activity

  1. robertodr commented on Jun 4, 2026

    @robertodr
    MemberAuthor

    Nice quote:

    auto-vectorization is not a programming model

    I've done a bit of reading and some very small experiments and I'm getting convinced that neither -march=native nor function multiversioning (attempted twice before) are the way to go. We need to go the explicit route (and SIMD in OpenMP is unfortunately only a suggestion to the compiler)

    Reading sources:

    I'll write in more details once I have a small prototype.

  2. transferred this issue fromon Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions