perf(forest): thread the reference BlockForest path — leaf sweeps and exchange descriptor loops
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- julia
- 领域
- backend, performance
调研方向
Start with _forest_sweep_leaves! and _forest_adjoint_sweep_leaves! in src/operators/forest.jl, then inspect the three descriptor loops in _exchange_storage! in src/transfer.jl. Check whether descriptors in each exchange phase can alias destinations and compare the executor decision with #51. Run examples/niederer_benchmark.jl and verify diffusion scales with -t while the adjoint sweep preserves the stated inner-product equality bit-for-bit against the serial path.
由索引模型根据 Issue 内容生成。
描述
Carved out of #49 (candidate 1) so it can be tracked as one unit of work.
_forest_sweep_leaves! (src/operators/forest.jl), _forest_adjoint_sweep_leaves!, and the three descriptor loops in _exchange_storage! (src/transfer.jl) are plain serial for loops; on CPU the packed kernels fall back to the same broadcasts. Leaves are disjoint and the exchange phases are ordered to be independent within a phase, so this looks close to embarrassingly parallel. In the Niederer benchmark the reaction term is threaded in example code while diffusion is not, which is a large part of why the two phases scale so differently (#49: diffusion 0.44× on 5.3× fewer cells).
Check first
Whether descriptors within one exchange phase can alias the same destination block. If they can, the threaded sweep needs a partition by destination or atomics; if they cannot, a Threads.@threads over descriptors is enough.
Constraints
- Same executor decision as #51 (KA CPU backend vs a threaded executor at the
apply!seam); pick once for both single-grid and forest paths. - Must not disturb the
_exchange_storage!/_bc_storage!rule seams: no allocation inside them, noField-typed rule arguments. - Acceptance: the
examples/niederer_benchmark.jlphase table shows the diffusion phase scaling with-t, and the adjoint sweep keeps ⟨Lx,y⟩ = ⟨x,Lᵀy⟩ bit-for-bit against the serial path.
🤖 Beep boop — Claude split this off #49; Kyle is not forking himself.
- 主要语言
- Julia
- 星标
- 3
- 派生
- 1
- 平均合并
- 4 天 19 小时
- 30 天内合并 PR
- 5
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RallypointOne/MatrixFreeOperators.jl 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
-
performance
难度 5/5 一周以上 新手友好度 45/100
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
RallypointOne/MatrixFreeOperators.jl#81 · 1 条评论 ·
查看 RallypointOne/MatrixFreeOperators.jl 的全部 Issue
相似的 Issue
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are damped可能已有人在做 @parth-patel010 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
FluxML/Optimisers.jl#247 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
OpenFUSIONToolkit/GPEC#644 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
SciML/DataDrivenDiffEq.jl#694 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
JuliaLang/LinearAlgebra.jl#1834 ·
维护者通常 1 天内回复