From 38d1f0c7a0520c53ed9225d3aad8d15d87102d05 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Thu, 25 Jan 2024 14:35:40 -0500 Subject: [PATCH] kompute : fix op_gelu -> Falcon is working on AMDVLK --- kompute-shaders/op_gelu.comp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kompute-shaders/op_gelu.comp b/kompute-shaders/op_gelu.comp index 5b547f414..9d8c53710 100644 --- a/kompute-shaders/op_gelu.comp +++ b/kompute-shaders/op_gelu.comp @@ -17,6 +17,6 @@ void main() { for (uint x = 0; x < 8; x++) { const uint i = baseIndex + x; 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))); } }