Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENH: Added -j auto for build cmd#314

Open
ganesh-k13 wants to merge 2 commits intoscientific-python:main from
ganesh-k13:auto_jobs
Open

ENH: Added -j auto for build cmd #314
ganesh-k13 wants to merge 2 commits intoscientific-python:main from
ganesh-k13:auto_jobs

Conversation

@ganesh-k13
Copy link
Contributor

@ganesh-k13 ganesh-k13 commented Feb 11, 2026

Changes

  • Added a -j auto for spin build

Testing

(np-test) ➜ numpy git:(main) spin build -j auto
Building with 12 parallel jobs
$ /<>/os/np-test/bin/python3 vendored-meson/meson/meson.py compile -j 12 -C build
INFO: autodetecting backend as ninja
...

We can speed up CI jobs for all NumPy workflows post this using -j auto

Copy link
Member

stefanv commented Feb 11, 2026

I think Meson has this built-in, if you set -j 0? But, it also seems to be on by default (I just checked, and NumPy compilation uses all cores).

Copy link
Contributor Author

Oh, my laptop was always using a single core, not sure why. Maybe an issue from my end, let me take a look.

Copy link
Contributor

This shouldn't be needed indeed. By default, ninja will use 2*n_cpu + 2 build processes (e.g., if your machine has 12 physical cores, it'll use max 26 processes). It isn't even possible to change that with an environment variable, only by explicitly passing -j1. So please look at how ninja gets invoked on your machine.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /