Skip to content

Commit

Permalink
Try out always using mm
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler committed Nov 14, 2024
1 parent 6139344 commit 79d4fed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions candle-core/src/quantized/metal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ impl QMetalStorage {
let m = dst_shape[..src_shape.rank() - self_shape.rank()]
.iter()
.product::<usize>();
if m == 1 {
return self.fwd_mv(self_shape, storage, layout);
}
// if m == 1 {
// return self.fwd_mv(self_shape, storage, layout);
// }

let last_k = dst_shape.pop().unwrap();
if last_k != k {
Expand Down
6 changes: 3 additions & 3 deletions candle-core/tests/quantized_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ fn quantized_matmul_neg(device: &Device) -> Result<()> {
Device::Metal(_) => assert_eq!(
to_vec2_round(&res, 0)?,
&[
[243666.0, -19714.0, -285433.0, -550453.0],
[23782.0, 21654.0, 19400.0, 18369.0],
[-196102.0, 63022.0, 324233.0, 587191.0]
[243659.0, -19716.0, -285444.0, -550439.0],
[23779.0, 21653.0, 19404.0, 18349.0],
[-196101.0, 63021.0, 324252.0, 587137.0]
]
),
Device::Cuda(_) => assert_eq!(
Expand Down

0 comments on commit 79d4fed

Please sign in to comment.