Visitar URL original
DOC: note that cpu-baseline=none does not disable CPU dispatch by berezucc · Pull Request #32826 · numpy/numpy · GitHub
Skip to content

DOC: note that cpu-baseline=none does not disable CPU dispatch - #32826

Open
berezucc wants to merge 1 commit into
numpy:mainfrom
berezucc:doc-cpu-baseline-none-dispatch
Open

berezucc wants to merge 1 commit into
numpy:mainfrom
berezucc:doc-cpu-baseline-none-dispatch

Conversation

@berezucc

@berezucc berezucc commented Sep 29, 2026 •

Copy link
Copy Markdown

PR summary

  • Closes DOC: If I build numpy with -Dcpu-baseline="none", will it still generate optimised code paths for newer CPUs? #31073
  • The issue asks whether cpu-baseline="none" still builds faster code paths for newer CPUs. The docs didn't say, and an early reply in the thread wrongly said no.
  • The answer is yes. Dispatch is separate from the baseline, and with the default cpu-dispatch="max", X86_V2, X86_V3 and newer are still built and picked at runtime. You can check this in meson_cpu/meson.build, where dispatch only skips features already in the baseline. The opt_func_info output posted in the thread shows the same thing.
  • On 2026-09-18 a maintainer (InessaPawson) asked for an explicit note saying this. That's what the PR adds, in the "Targeting Older CPUs" section. It also says how to turn dispatch off (cpu-dispatch="none") and points to opt_func_info.
  • It also fixes a small typo nearby ("This unsuitable" → "This is unsuitable").

First time contributor introduction

First time contributor here! I'm Nikita at Bloomberg, an engineer on our electronic trading team - previously an ML engineer at DRW and Shopify. Many of my ML and AI initiatives relied on NumPy for core numerical work, which is why I wanted to contribute back.

AI Disclosure

  • Tool: Claude Code (Claude Opus 5.5).

@berezucc
berezucc marked this pull request as draft September 29, 2026 19:51
@jorenham

This comment was marked as resolved.

@jorenham jorenham closed this Sep 29, 2026
@InessaPawson InessaPawson added the sustain-2026 Issues reserved for NumFOCUS Sustaining Open Source Series 2026 label Oct 2, 2026
@InessaPawson InessaPawson reopened this Oct 2, 2026
@InessaPawson

Copy link
Copy Markdown
Member

@berezucc Hi, Nikita! Thank you for taking the time to fill out the PR template. We’ll review the PR and follow up with any feedback by the next office hours.

@InessaPawson InessaPawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed changes address the issue, so LGTM.

@berezucc One non-code request: please remove what looks like leftover placeholder text from the PR description: "Why you're interested: your own reason, for example the NumFOCUS program or your own use of NumPy".
Also, for future PRs, please take a little time to review your submission before requesting a review. Every PR to this project is reviewed by humans. Doing a thoughtful self-review first helps make the best use of everyone’s time.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

04 - Documentation sustain-2026 Issues reserved for NumFOCUS Sustaining Open Source Series 2026

Projects

Development

Successfully merging this pull request may close these issues.

DOC: If I build numpy with -Dcpu-baseline="none", will it still generate optimised code paths for newer CPUs?

3 participants