Skip to content

Commit 38d1f0c

Browse files
committed
kompute : fix op_gelu -> Falcon is working on AMDVLK
1 parent 6fc99a6 commit 38d1f0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kompute-shaders/op_gelu.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ void main() {
1717
for (uint x = 0; x < 8; x++) {
1818
const uint i = baseIndex + x;
1919
const float y = in_[i + pcs.inOff];
20-
out_[i + pcs.outOff] = 0.5*y*(1.0 + tanh(SQRT_2_OVER_PI*y*(1.0 + GELU_COEF_A*y*y)));
20+
out_[i + pcs.outOff] = 0.5*y*(1.0 + tanh(clamp(SQRT_2_OVER_PI*y*(1.0 + GELU_COEF_A*y*y), -15.0, 15.0)));
2121
}
2222
}

0 commit comments

Comments
 (0)