Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2026 21:10:45 +0300
From:      Max Brazhnikov <makc@freebsd.org>
To:        Vladimir Druzenko <vvd@freebsd.org>, Charlie Li <vishwin@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: b0b4d9e1eae8 - main - */*: Switch to NumPy 2.x
Message-ID:  <nYGoYZ2GQVSQo7_w7bMvjg@freebsd.org>
In-Reply-To: <90e36e0f-0d12-4074-b19e-dd7998788ab4@freebsd.org>
References:  <69fa4601.3fb5c.76ab51f0@gitrepo.freebsd.org> <0a2389d3-cce3-4a17-a928-d17b095dcff5@freebsd.org> <90e36e0f-0d12-4074-b19e-dd7998788ab4@freebsd.org>

index | next in thread | previous in thread | raw e-mail

On Mon, 11 May 2026 17:40:13 -0400 Charlie Li wrote:
> Vladimir Druzenko wrote:
> > 11.05.2026 22:29, Charlie Li пишет:
> >> Max Brazhnikov wrote:
> >>> -Dcpu-baseline="none" is safe to commit and should be committed if we 
> >>> claim support for older CPU.
> >>>
> >> This is not as clear-cut as it seems. CPU dispatching on top of -Dcpu- 
> >> baseline=none does not cover all optimised code paths that newer/ 
> >> feature-rich CPUs can use.
> > Official documentation says otherwise: https://numpy.org/devdocs/ 
> > reference/simd/build-options.html
> I quoted what I said from this, please read again. "Dispatched kernels 
> *don't* cover all code paths." (emphasis mine) This means that certain 
> optimisations are never available, even on CPUs that support them, when 
> baseline is none, which is not acceptable. In particular, C++ routines 
> are not able to be dispatch-optimised yet.>> Given that numpy is a very 
> performance-sensitive software and
> >> considering its userbase, this kind of performance hit can be a 
> >> showstopper.
> >>
> >> The base system can claim support for older CPU however it wants, but 
> >> it does not mean individual third-party software has to do the same. 
> >> Of course we in ports should make our best efforts in this regard but 
> >> the expected majority use-cases and configurations need to take 
> >> precedence.
> >>
> >> I'm not opposed to an option that makes clear that -Dcpu-baseline=none 
> >> is both not the default and strongly discouraged outside of CPUs older 
> >> than or lack features of -Dcpu-baseline=min.
> > 
> > How many years to wait for the "right" decision?
> > 
> Whoever wants to implement an option following this description before 
> me or another python@ member gets to it is welcome to submit a diff for 
> consideration.

We either should officially drop support for CPU without SSE for packages
or add -Dcpu-baseline=none to numpy port by default.

We may also add OPTIMIZED_CFLAGS or whatever option to build numpy with
-Dcpu-baseline="native" and -Dcpu-dispatch="none".

Cheers,
Max




home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?nYGoYZ2GQVSQo7_w7bMvjg>