kompute : fix op_gelu -> Falcon is working on AMDVLK

This commit is contained in:
Jared Van Bortel 2024-01-25 14:35:40 -05:00
parent 6fc99a6e66
commit 38d1f0c7a0

View file

@ -17,6 +17,6 @@ void main() {
for (uint x = 0; x < 8; x++) { for (uint x = 0; x < 8; x++) {
const uint i = baseIndex + x; const uint i = baseIndex + x;
const float y = in_[i + pcs.inOff]; const float y = in_[i + pcs.inOff];
out_[i + pcs.outOff] = 0.5*y*(1.0 + tanh(SQRT_2_OVER_PI*y*(1.0 + GELU_COEF_A*y*y))); 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)));
} }
} }