Mutation Support
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- julia
調査の方向性
既存のエントリポイント spawn_datadeps と #454 で説明されている作業から始め、その後、frontend、scheduler、cache management、processor-associated memory spaces をどのように変更する必要があるかを調べます。完了条件は、mutation ownership、synchronization、copying と versioning、Non-Chunk arguments、dependency specification を網羅した設計が確定していることです。
索引モデルが 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時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信