Skip to content

Ofast compiler flag in PowerPC #5320

@imciner2

Description

@imciner2

We have been carrying a patch in Julia for quite a few years that removes all the occurrences of -Ofast from Makefile.power (the only place it is ever used in OpenBLAS), because we forbid its use in Julia.

Looking at how it is actually used in the command line, it is used with the fast math optimizations disabled:

CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math

Those optimizations make up the core part of it, and other than enabling the O3 optimizations, it tells the compiler to also allow possible data races when optimizing, so I am curious why -Ofast used here?

Ideally I would like to work on removing our Julia-specific patch for this, and I can see that done in one of two ways:

  1. Introduce a NO_OFAST build option that we can set that guards this.
  2. Just remove it from those PowerPC build options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions