Fixes for norm.

This commit is contained in:
Adam Treat 2023-10-02 21:00:48 -04:00 committed by cebtenzzre
parent 06d4b21598
commit 32289aa447
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ void main() {
const float mean = sum[0];
// recenter
const uint y = (gl_WorkGroupID.x*pcs.ne00/4) + pcs.outOff; // Based from out_
const uint y = (gl_WorkGroupID.x*pcs.ne00) + pcs.outOff; // Based from out_
for (uint i00 = gl_LocalInvocationID.x; i00 < pcs.ne00; i00 += nth) {
out_[y+i00] = in_[x+i00] - mean;
}

View File

@ -10,7 +10,7 @@
#include "common.comp"
#define nth 256
#define nth 512
layout(local_size_x = nth) in;
@ -56,7 +56,7 @@ void main() {
const float scale = 1.0f/sqrt(sum[0] + pcs.eps);
const uint y = (gl_WorkGroupID.x*pcs.ne00/4) + pcs.outOff; // Based from out_
const uint y = (gl_WorkGroupID.x*pcs.ne00) + pcs.outOff; // Based from out_
for (uint i00 = gl_LocalInvocationID.x; i00 < pcs.ne00; i00 += nth) {
out_[y+i00] = in_[x+i00] * scale;
}