Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve SAGE_FAT_BINARY for openblas #22179

Closed
jpflori opened this issue Jan 12, 2017 · 14 comments
Closed

Improve SAGE_FAT_BINARY for openblas #22179

jpflori opened this issue Jan 12, 2017 · 14 comments

Comments

@jpflori
Copy link

jpflori commented Jan 12, 2017

At the moment it unconditionally passes TARGET=PRESCOTT.
This is unfortunate on non x86 CPUs.

We replace it by DYNAMIC_ARCH=1, which will work for non-x86 - and also give better performance for x86_64.

CC: @vbraun @jdemeyer @kliem

Component: packages: standard

Author: Matthias Koeppe

Branch: 75c9d68

Reviewer: Jonathan Kliem

Issue created by migration from https://trac.sagemath.org/ticket/22179

@jpflori jpflori added this to the sage-7.5 milestone Jan 12, 2017
@kiwifb
Copy link
Member

kiwifb commented Jan 14, 2017

comment:1

I guess it is, but we don't offer binaries for other CPUs at this stage do we?

@mkoeppe mkoeppe modified the milestones: sage-7.5, sage-9.3 Aug 17, 2020
@kliem
Copy link
Contributor

kliem commented Aug 21, 2020

comment:3

From the readme:

Support for multiple targets in a single library

OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying DYNAMIC_ARCH=1 in Makefile.rule, on the gmake command line or as -DDYNAMIC_ARCH=TRUE in cmake.

For x86_64, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX. For cpu generations not included in this list, the corresponding older model is used. If you also specify DYNAMIC_OLDER=1, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option DYNAMIC_LIST that allows to specify an individual list of targets to include instead of the default.

DYNAMIC_ARCH is also supported on x86, where it translates to Katmai, Coppermine, Northwood, Prescott, Banias, Core2, Penryn, Dunnington, Nehalem, Athlon, Opteron, Opteron_SSE3, Barcelona, Bobcat, Atom and Nano.

On ARMV8, it enables support for CortexA53, CortexA57, CortexA72, CortexA73, Falkor, ThunderX, ThunderX2T99, TSV110 as well as generic ARMV8 cpus.

For POWER, the list encompasses POWER6, POWER8 and POWER9, on ZARCH it comprises Z13 and Z14.

The TARGET option can be used in conjunction with DYNAMIC_ARCH=1 to specify which cpu model should be assumed for all the common code in the library, usually you will want to set this to the oldest model you expect to encounter. Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 3, 2021

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 3, 2021

New commits:

75c9d68build/pkgs/openblas/spkg-install.in: For SAGE_FAT_BINARY=yes, use DYNAMIC_ARCH=1

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 3, 2021

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 3, 2021

Commit: 75c9d68

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 3, 2021

Author: Matthias Koeppe

@kliem
Copy link
Contributor

kliem commented Jan 3, 2021

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/458445502 to Jonathan Kliem

@kliem
Copy link
Contributor

kliem commented Jan 3, 2021

comment:6

LGTM and this is exactly what the README tells us to do.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 3, 2021

comment:7

Thanks!

@vbraun
Copy link
Member

vbraun commented Jan 17, 2021

Changed branch from u/mkoeppe/improve_sage_fat_binary_for_openblas to 75c9d68

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 6, 2021

Changed commit from 75c9d68 to none

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 6, 2021

comment:9

Follow up in #29537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants