Re: git: b0b4d9e1eae8 - main - */*: Switch to NumPy 2.x

From: Vladimir Druzenko <vvd_at_freebsd.org>
Date: Wed, 20 May 2026 15:17:48 UTC
13.05.2026 21:10, Max Brazhnikov пишет:
> 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.
There's some strange situation there - either SSE4.2 or no SSE, 
including SSE1 and SSE2, which are present in all CPUs that support amd64.

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

> Cheers,
> Max


-- 
Best regards,
Vladimir Druzenko