Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler committed Nov 13, 2024
1 parent 86b0836 commit 34f6739
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions candle-nn/src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,6 @@ impl candle::CustomOp2 for AttnSoftmaxLastDim {
}

let elem_count = a_l.shape().elem_count();
// let float_buf = device.new_buffer(elem_count, DType::F32, "attn-softmax")?;
let output = device.new_buffer(elem_count, a_s.dtype(), "attn-softmax")?;
candle_metal_kernels::call_last_attn_softmax(
device.metal_device(),
Expand All @@ -508,7 +507,6 @@ impl candle::CustomOp2 for AttnSoftmaxLastDim {
a_l.dims(),
self.scale,
ty,
// &float_buf,
&output,
)
.map_err(candle::Error::wrap)?;
Expand All @@ -519,7 +517,7 @@ impl candle::CustomOp2 for AttnSoftmaxLastDim {

/// Softmax with fused broadcast addition of a mask and scale.
/// Equivalent to:
/// ```no_run
/// ```ignore
/// candle_nn::ops::softmax_last_dim(&(xs.broadcast_add(&mask)? * scale as f64)?)?
/// ```
/// - `xs` must be a rank-4 tensor
Expand Down

0 comments on commit 34f6739

Please sign in to comment.