diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2024-09-21 15:03:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-21 15:03:19 +0200 |
commit | 844d45cde4c5068fc45aaebd5858c8370a93ca20 (patch) | |
tree | e778914e8097a85cdb09b59e1509fdd0fd466db7 /candle-metal-kernels | |
parent | af2104078f25865a02e18712986ee4b988d7affb (diff) | |
download | candle-844d45cde4c5068fc45aaebd5858c8370a93ca20.tar.gz candle-844d45cde4c5068fc45aaebd5858c8370a93ca20.tar.bz2 candle-844d45cde4c5068fc45aaebd5858c8370a93ca20.zip |
Bugfix for the metal elu kernel. (#2490)
* Bugfix for the metal elu kernel.
* Add a test.
Diffstat (limited to 'candle-metal-kernels')
-rw-r--r-- | candle-metal-kernels/src/affine.metal | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-metal-kernels/src/affine.metal b/candle-metal-kernels/src/affine.metal index cbbb03e2..e5229f55 100644 --- a/candle-metal-kernels/src/affine.metal +++ b/candle-metal-kernels/src/affine.metal @@ -105,7 +105,7 @@ kernel void FN_NAME##_strided( \ return; \ } \ const TYPENAME x = input[get_strided_index(id, num_dims, dims, strides)]; \ - output[id] = TYPENAME((x > 0)?x: mul * exp(x - 1)); \ + output[id] = TYPENAME((x > 0)?x: mul * (exp(x) - 1)); \ } \ |