[Migrated] Initializing workgroup memory
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.4k
- フォーク
- 126
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1077
Old labels: t: enhancement
Originally creatd by kevinboulain on 2023-07-04T20:07:53Z
As far as I can tell, the workgroup/shared memory (context) can not be declared as to be zero-initialized and one has to do it manually.
https://github.com/KhronosGroup/Vulkan-Docs/issues/1457 has a bunch of interesting links: the extension VK_KHR_zero_initialize_workgroup_memory (promoted to core in Vulkan 1.3) allows to declare workgroup/shared variables with a null initializer. On the SPIR-V side, OpVariable with a Workgroup storage class is allowed to be initialized with OpConstantNull only (like so).
I don't know what the project would prefer, it could be an option to pass to the SpirvBuilder (I assume it could be desirable to always initialize these variables) or another symbol (similarly to how storage_buffer allows extra arguments):
#[spirv(compute(threads(256)))]
fn compute(
#[spirv(workgroup, null_initialized = true)] array: &mut [u32; N],
// ...
) {
// ...
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず SpirvBuilder と workgroup/shared メモリの既存の処理を追跡し、次にリンクされている OpConstantNull に関する Vulkan および SPIR-V のルールと比較します。プロジェクトで、ゼロ初期化された workgroup メモリを要求するための API が決定され、対応する有効な SPIR-V 出力がサポートされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers, computer-graphics
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100