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:
parent
45abe0f74e
commit
904109ed0d
3 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue