vulkan: fix group_norm (#10496)

Fix bad calculation of the end of the range. Add a backend test that
covers the bad case (taken from stable diffusion).

Fixes https://github.com/leejet/stable-diffusion.cpp/issues/439.
This commit is contained in:
Jeff Bolz 2024-11-26 09:45:05 -06:00 committed by GitHub
parent 45abe0f74e
commit 904109ed0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -19,7 +19,7 @@ void main() {
const uint tid = gl_LocalInvocationID.x;
const uint start = gl_WorkGroupID.x * group_size + tid;
const uint end = start + group_size;
const uint end = (gl_WorkGroupID.x + 1) * group_size;
tmp[tid] = 0.0f;