Dynamic control over ninja parallelism, or generic dynamic features
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Bắt đầu với giao diện dành cho nhà phát triển hiện có của meson-python và SciPy PR 18451 được liên kết, sau đó so sánh trường hợp sử dụng của phiên bản gh-159 với upstream ninja issue. Công việc được xem là hoàn tất khi có một cơ chế đã được quyết định và ghi lại tài liệu để chạy Python do package định nghĩa trước khi build và thiết lập các thuộc tính được hỗ trợ như compile-args và version.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
First the specific feature we need in SciPy: set the number of parallel compile jobs for ninja to equal the number of available physical cores (n_phys). We have a number of reports about the ninja default setting, which is 2*n_phys + 2, either giving out of memory errors or even crashing the build machine outright:
- https://github.com/scipy/scipy/issues/17941 is a report for a Chromebook running Debian (with a very good description of the problem and background info)
- https://github.com/scipy/scipy/issues/18443 reports the issue on multiple Windows machines, with a regular 8-core CPU and 16 GB RAM
- https://github.com/ninja-build/ninja/issues/2187 is a/the relevant upstream issue
For local development this was not difficult to address (see https://github.com/scipy/scipy/pull/18451), because SciPy has a developer interface where we can run custom code before invoking Meson. However, for pip install & co, there is no way to do that currently. So a user who may be installing some random package that happens to depend on SciPy may get crash or hang that we can't easily prevent. Hardcoding, say, -j4 is not great - there is no setting that works on low-end machines without throwing away lots of performance on high-end machines. The optimal settings seems to always be close to the number of physical cores.
So, ideally there would be a hook that meson-python exposes to package authors which can run arbitrary Python code to then set compile-args with.
I also see a more general pattern here, with gh-159 being another example of the need to execute code first and then set some build-related property (the package version in that case). It's a very similar case, and rather than a specific solution for each of these two problems, we may consider a general mechanism to deal with this kind of thing. Maybe a single Python function to execute, which must return a dict containing a pre-determined set of keys, including version, compile-args and the other *-args knobs.
Thoughts?
- Ngôn ngữ chính
- Python
- Star
- 180
- Fork
- 93
- Merge trung bình
- 20 giờ 58 phút
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mesonbuild/meson-python
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
mesonbuild/meson-python#541 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
mesonbuild/meson-python#473 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement tests
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
mesonbuild/meson-python#903 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
mesonbuild/meson-python#871 · 7 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pip install overrides existing build configurationCó thể đã có người làm @Alvaro-Kothe đã nhận 113 ngày trước. Đang mởquestion
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
mesonbuild/meson-python#851 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mesonbuild/meson-python
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
data-umbrella/du-event-board#225 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100