[Mesa-dev] [PATCH] swr: Add arch flags to support Cray and PGI compilers

Chuck Atkins chuck.atkins at kitware.com
Mon Jul 31 20:51:42 UTC 2017


Hi Tim,


> If the Cray flags are for wrapper scripts, why do we need specific flags
> for that instead of using the underlying compiler flags?
>

Sort answer: It's the "Cray" way of doing things.

Long answer: The target-cpu flag sometimes just controlls the -march flags
(or equiv) but it can also add other low level flags.  By using the
target-cpu flag with the cray compiler wrappers, you ensure that you're
using whatever flags for a given architecture are appropriate for the
underlying compiler, even if you don't have that compiler knowledge
specified encoded anywhere in your configure.  For instance, when using
another compiler backend that ./configure isn't explicitly checking for
(pathscale, actual cray compiler, etc.), then the build will continue to
work because -target-cpu gets translated by the wrpper to whatever is
appropriate.  You'll also get a default set of flags loaded anyways based
on your module environment.  Specifying target-cpu replaces those default
flags whereas adding -xCORE-AVX512 would just append to them, maybe
overriding the default flags, maybe not, depending on how the module
environment is set up.  It's one of the many quirks and oddities of the
Cray Programming Environment.



> I’m guessing you intend this for the 17.2 branch as well?
>

Nope.  I've no pressing customer need for it so keeping it in master but
out of stable is fine with me.


----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170731/b540919c/attachment-0001.html>


More information about the mesa-dev mailing list