Deduplicate concurrent compilations of the same kernel
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- performance
調査の方向性
Start in compile_or_lookup in src/launch.jl, where the existing job_results_lock check and the compile-outside-lock path live, and read cached_results(job) to see how one TileCompilerResults maps to each job. Add per-result in-flight tracking with a Threading.Condition created on that lock, and keep the in-flight state out of TileCompilerResults, since that type is serialized into package images. Done means concurrent misses for one job run tileiras once, waiters reuse the published cubin and call GPUCompiler.run_compile_hook, and a failed compile wakes waiters so they retry rather than hang.
索引モデルが issue の本文から書いたものです。
説明
compile_or_lookup (src/launch.jl) already compiles outside job_results_lock, but concurrent misses for the same job all compile: each requester runs emit_tile and its own tileiras, and the first result to be published wins. ObjCache.get! does not deduplicate in-flight work either.
On an RTX 5080, 8 tasks first-launching the same matmul configuration spawned tileiras 8 times for that job. tileiras takes 55–550 ms for the example kernels (fmha: 0.64 s, 133 MB RSS, single-threaded), against 1–27 ms for emit_tile, so every duplicate costs a full assembler run. With more tasks than cores, that also delays the first launch for everyone.
JuliaGPU/CUDA.jl#3398 handles the same situation for CUDA.jl's ptxas, with in-flight tracking modelled on Base.require's package_locks. Here it could go in compile_or_lookup, since cached_results(job) already returns one TileCompilerResults per job:
- keep an
IdDict{TileCompilerResults,Threads.Condition}guarded byjob_results_lock, with every condition created on that lock; - under the lock: if
res.cubinis set, return it; if an entry exists,waiton it and check again; otherwise register a condition and compile outside the lock; - under the lock, publish
res.cubin, then remove the entry andnotify(in afinally, so that after a failure the waiters retry instead of hanging); - waiters that end up with a published CUBIN call
GPUCompiler.run_compile_hook(job), like hits do.
The in-flight state shouldn't live on TileCompilerResults itself, which is serialized into package images.
- 主要言語
- Julia
- スター
- 90
- フォーク
- 13
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 19
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaGPU/cuTile.jl のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JuliaGPU/cuTile.jl#295 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
`atomic_store_add` of a slice extracted from a tile adds nothing when the slice is under 256 bytesオープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JuliaGPU/cuTile.jl#333 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 3 日以内に返信
JuliaGPU/cuTile.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
メンテナーはふだん 3 日以内に返信
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
FluxML/Optimisers.jl#253 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
`poissonians` is not public, unlike `brownians` and `jumps`対応中かも @isaacsas が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
SciML/ModelingToolkit.jl#5389 ·
メンテナーはふだん 2 日以内に返信