Inline linear SCC solves share one `LinearCache` per matrix size, so every call refactorizes
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- performance
Hướng nghiên cứu
Start by tracing numeric_ldiv! and solve_into! to see how task-local LinearCache instances are selected and refactorized. The issue suggests adding a solve-site key to emitted safe_ldiv(A, b) calls; compare that approach with keying by A's buffer and consider cache lifetime. Done when unchanged matrices at distinct inline linear SCC solve sites reuse their own factorization without retaining a cache for every problem built.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
numeric_ldiv! keeps one task-local LinearCache per array type and size, shared by every inline linear SCC solve of that shape. So solve_into! copies A in and refactorizes on every call, even when A hasn't changed, since another site of the same size may have used the cache in between.
With one cache per solve site (still task-local), a site whose A depends only on parameters could keep its factorization. On the model below, skipping the refactorization while A is unchanged makes f about 2.5x faster at N = 12 and 1.5x at N = 6 (Julia 1.12).
The emitted safe_ldiv(A, b) would need a site key to key the cache by, e.g. a third argument. Keying by A's buffer instead would leave the emitted code alone, but keep a cache alive for every problem ever built.
@DhairyaLGandhi does this direction sound right? Related: #173.
Model
using ModelingToolkit, LinearAlgebra
using ModelingToolkit: t_nounits as t, D_nounits as D
import ModelingToolkitTearing as MTKTearing
N = 12
@variables x(t)[1:N] y(t)[1:N]
@parameters K[1:N, 1:N]
eqs = [[D(x[i]) ~ -x[i] + y[i] for i in 1:N]; [sum(K[i, j] * y[j] for j in 1:N) ~ x[i] for i in 1:N]]
sys = mtkcompile(System(eqs, t; name = :m);
reassemble_alg = MTKTearing.DefaultReassembleAlgorithm(; inline_linear_sccs = true))
prob = ODEProblem(sys, [x => (1:N) ./ N, K => fill(0.5, N, N) + N * I], (0.0, 1.0))
- Ngôn ngữ chính
- Julia
- Star
- 8
- Fork
- 14
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 4
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 JuliaComputing/StateSelection.jl
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
JuliaComputing/StateSelection.jl#183 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
JuliaComputing/StateSelection.jl#177 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Inlined linear SCC of three unknowns: the run-time solve dominates the cost of the right-hand sideĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
JuliaComputing/StateSelection.jl#173 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
JuliaComputing/StateSelection.jl#172 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
State-machine query operators in ModelingToolkitTearing throw UndefVarError for wrapCó thể đã có người làm @baggepinnen đã nhận 18 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
JuliaComputing/StateSelection.jl#170 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của JuliaComputing/StateSelection.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add project: Typst_jll.jlCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mởadd-project
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
YDX-2147483647/best-of-typst#590 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100