summaryrefslogtreecommitdiff
path: root/candle-metal-kernels
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2024-09-21 15:03:19 +0200
committerGitHub <noreply@github.com>2024-09-21 15:03:19 +0200
commit844d45cde4c5068fc45aaebd5858c8370a93ca20 (patch)
treee778914e8097a85cdb09b59e1509fdd0fd466db7 /candle-metal-kernels
parentaf2104078f25865a02e18712986ee4b988d7affb (diff)
downloadcandle-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.metal2
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)); \
} \