Part 1
Issue with current documentation:
I have trouble understanding this section of the docs: https://numpy.org/devdocs//reference/simd/build-options.html#targeting-older-cpus
In the default build of numpy, cpu-baseline is set to min. In this case, the docs state that numpy will generate multiple code paths and at runtime dynamically choose the fastest one depending on the CPU architecture it is executed on.
If I set cpu-baseline to none, is that still the case? Or will it generate only one code path for all CPUs?
Idea or request for content:
Describe how setting cpu-baseline from min to none affects the other code paths that are usually generated. Does changing this setting just add one more code path, or does it also alter the ones it would generate without changing this setting?
Part 2
In case setting cpu-baseline to none actually affects the other code paths, then also the following should be documented.
Issue with current documentation:
The current documentation does not mention how to build numpy for CPUs below cpu-baseline=min without disabling optimisations for newer CPUs.
Idea or request for content:
Explain how to build numpy with an extra code path for CPUs without SSE4.2, while also building all default code paths.
In other words, if numpy by default builds N code paths, explain how to build numpy with these same N code paths and additionally another code path for CPUs without SSE4.2.
Part 1
Issue with current documentation:
I have trouble understanding this section of the docs: https://numpy.org/devdocs//reference/simd/build-options.html#targeting-older-cpus
In the default build of numpy,
cpu-baselineis set tomin. In this case, the docs state that numpy will generate multiple code paths and at runtime dynamically choose the fastest one depending on the CPU architecture it is executed on.If I set
cpu-baselinetonone, is that still the case? Or will it generate only one code path for all CPUs?Idea or request for content:
Describe how setting
cpu-baselinefrommintononeaffects the other code paths that are usually generated. Does changing this setting just add one more code path, or does it also alter the ones it would generate without changing this setting?Part 2
In case setting
cpu-baselinetononeactually affects the other code paths, then also the following should be documented.Issue with current documentation:
The current documentation does not mention how to build numpy for CPUs below cpu-baseline=min without disabling optimisations for newer CPUs.
Idea or request for content:
Explain how to build numpy with an extra code path for CPUs without SSE4.2, while also building all default code paths.
In other words, if numpy by default builds N code paths, explain how to build numpy with these same N code paths and additionally another code path for CPUs without SSE4.2.