D3D12 Swin kernels: weight staging stores the last chunk from several threads
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- computer-graphics
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- C++
- Stars
- 12
- Forks
- 2
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 171
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phantoslayer21/wronggpu
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
phantoslayer21/wronggpu#275 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
phantoslayer21/wronggpu#274 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
phantoslayer21/wronggpu#241 ·
Maintainers usually reply within 1 day
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
phantoslayer21/wronggpu#234 ·
Maintainers usually reply within 1 day
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
phantoslayer21/wronggpu#233 ·
Maintainers usually reply within 1 day
All issues in phantoslayer21/wronggpu
Similar issues
-
ai_p2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ClickHouse/ClickHouse#132519 ·
Maintainers usually reply within 1 day
-
[Bug]: VST3 getMidiControllerAssignment reads past midiControllerToParameter for program changeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
juce-framework/JUCE#1810 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
petercorke/robotics-toolbox-python#952 ·
Maintainers usually reply within 1 day
-
NatronRenderer: a Python error in the script (-t / project script) doesn't change the exit statusOpenfunc:engine type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NatronGitHub/Natron#1276 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day