diff options
author | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-12-18 15:22:43 +0100 |
---|---|---|
committer | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-12-18 15:22:43 +0100 |
commit | 03641293eeb1dd0ff3d5a93e85c7f9eb289704e4 (patch) | |
tree | 60a447daf0dd6e47bab6857005c341b3096e3168 /candle-nn/src | |
parent | 064ba17bd7de0e3c6f18f93cfe14db97e7ebca0b (diff) | |
download | candle-03641293eeb1dd0ff3d5a93e85c7f9eb289704e4.tar.gz candle-03641293eeb1dd0ff3d5a93e85c7f9eb289704e4.tar.bz2 candle-03641293eeb1dd0ff3d5a93e85c7f9eb289704e4.zip |
Clippy pass.
Diffstat (limited to 'candle-nn/src')
-rw-r--r-- | candle-nn/src/ops.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/candle-nn/src/ops.rs b/candle-nn/src/ops.rs index 816eff42..abe33350 100644 --- a/candle-nn/src/ops.rs +++ b/candle-nn/src/ops.rs @@ -226,17 +226,17 @@ impl candle::CustomOp1 for SoftmaxLastDim { let last_dim = layout.dims()[layout.shape().rank() - 1]; let elem_count = layout.shape().elem_count(); - let mut output = device.new_buffer(elem_count, storage.dtype(), "softmax")?; + let output = device.new_buffer(elem_count, storage.dtype(), "softmax")?; candle_metal_kernels::call_last_softmax( device.metal_device(), &command_buffer, - &kernels, + kernels, name, elem_count, last_dim, storage.buffer(), layout.start_offset() * storage.dtype().size_in_bytes(), - &mut output, + &output, ) .unwrap(); let newstorage = candle::MetalStorage::new(output, device.clone(), storage.dtype()); |