D3D12 Swin kernels: weight staging stores the last chunk from several threads

オープン
#118 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発

調査の方向性

Start in clean/dx12/kernels/swin_block.hlsl, at the weight staging code for the partial row where threads past the last 16-byte chunk write to the same groupshared addresses, and compare it with the HIP version the issue cites. The change is a store guard on the chunk index against the chunk count, with the barrier kept. Done means the guard is in place, the bit-exact checks pass for every kernel built from the template, and the DXIL hash record is regenerated.

索引モデルが issue の本文から書いたものです。

説明

In the D3D12 Swin block template (clean/dx12/kernels/swin_block.hlsl, weight staging), when the number of 16-byte chunks is smaller than the thread count of the group, the threads past the last chunk all store that last chunk to the same groupshared addresses. The stored values are identical, and no wrong output has been observed, but the HIP version has exactly one writer per address and the D3D12 version should match it instead of relying on how the driver treats overlapping stores.

Applies to every channel count, including Model M's shipped kernels and the C = 32 block of Model L (#117).

Fix: in the partial row, store only when the thread's chunk index is below the chunk count; keep the barrier. Because this changes Model M's shader binaries, the change needs the bit-exact checks and the DXIL hash record redone for all kernels built from the template.

Found in review of #117. Refs #89

主要言語
C++
スター
12
フォーク
2
平均マージ
3時間 10分
マージ済み PR(30日)
171

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

phantoslayer21/wronggpu のほかの issue

phantoslayer21/wronggpu の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。