Mutation Support
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- julia
调研方向
从现有的 spawn_datadeps 入口点和 #454 中描述的工作开始,然后研究 frontend、scheduler、缓存管理以及与 processor 关联的内存空间需要如何变更。完成标准是确定一套涵盖 mutation ownership、同步、复制和版本控制、非 Chunk 参数以及依赖关系规范的设计。
由索引模型根据 Issue 内容生成。
描述
Dagger has previously been a purely-functional model, expecting that new values are calculated by applying a function to a set of existing values, without allowing for arguments to be mutated or changed in any way. This model is convenient from an optimization perspective (as we can do aggressive caching and duplication of data, memoization of results, etc.), but it's also quite limiting for users operating in an imperative language like Julia.
I've long desired to find a way to relax this model, and in the course of working on #454, I've found that the simple In/Out model of OpenMP's data dependency system (that spawn_datadeps implements) is quite powerful and allows for a very convenient programming interface, while utilizing a variety of powerful performance optimizations. It also seems to leave room for more fine-grained synchronization and mutation systems going forward.
Of course, spawn_datadeps is rather limiting if we want to optimize over a larger region of code, including nested datadeps regions, which aren't trivial to support with the current implementation. Therefore, I'd like to consider what would be required to move support for the same programming model and optimizations directly into Dagger, to see what that would look like.
Here are the basic set of high-level changes that we'll need to support this model:
In/Outunwrapping and propagation in the frontend- Data ownership tracking (exclusive (write) vs. shared (read)) in the scheduler
- Careful cache management in the face of mutating values (i.e. proper alternative to https://github.com/JuliaParallel/Dagger.jl/pull/465)
- Awareness of processor-associated memory spaces and their aliasing properties
copyto!alternative which integrates with Dagger's synchronization (required for GPU support)- Relaxed semantics w.r.t writing data into the original user-provided data containers (lazy writing allows for reduced data transfers and better parallelism), similar to Tapir's sync regions
- (Speculative) Data copying and versioning system in the scheduler, to make copies of data for reading and track which copies are up-to-date w.r.t last write
- A plan on how to deal with non-
Chunkarguments, w.r.t what we'll need to do to ensure we can still track them appropriately and enable distributed parallelism - A system for utilizing Julia's compiler to determine dependencies automatically, when unspecified
- A system for specifying dependencies ahead-of-time for a given dispatch signature
- 主要语言
- Julia
- 星标
- 734
- 派生
- 94
- 平均合并
- 4 天 18 小时
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaParallel/Dagger.jl 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 38/100
JuliaParallel/Dagger.jl#786 · 1 条评论 ·
-
MPI: tasks with acceleration=DistributedAcceleration() go missing when ranks spawn them independently可能已有人在做 @AnnaLena77 于 39 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 15/100
JuliaParallel/Dagger.jl#778 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 55/100
JuliaParallel/Dagger.jl#759 · 3 条评论 ·
-
bug datadeps
难度 4/5 3-5 天 新手友好度 35/100
JuliaParallel/Dagger.jl#665 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 30/100
JuliaParallel/Dagger.jl#661 · 1 条评论 ·
查看 JuliaParallel/Dagger.jl 的全部 Issue
相似的 Issue
-
docs
难度 1/5 1 小时以内 新手友好度 88/100
-
path: splitext treats directory references and leading dots as extensions可能已有人在做 @Hiten0305l 今天认领。 未关闭
难度 2/5 半天 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
JuliaRegistries/RegistryCI.jl#758 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
JuliaParallel/Hwloc.jl#93 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复