kompute : fix op_gelu -> Falcon is working on AMDVLK
This commit is contained in:
parent
6fc99a6e66
commit
38d1f0c7a0
1 changed files with 1 additions and 1 deletions
|
@ -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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue