Skip to content

Commit

Permalink
fix mm benches
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieupoumeyrolsonos authored and kali committed Oct 16, 2023
1 parent c92f596 commit cc91e4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions linalg/benches/arm64.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
use std::time::Instant;

use tract_data::prelude::*;
use tract_linalg::frame::mmm::LinearSpec;
use tract_linalg::LADatum;
use tract_linalg::frame::mmm::FusedSpec;
use tract_linalg::frame::mmm::MatMatMulKer;
use tract_linalg::frame::mmm::MatMatMulKerSpec;
use tract_linalg::mmm::{InputStoreKer, OutputStoreKer};

fn ruin_cache() {
let _a = (0..1000000).collect::<Vec<i32>>();
}

fn bench_to_nanos<T: Datum + Copy + num_traits::Zero, K: MatMatMulKer<T>>(
fn bench_to_nanos<T: LADatum + Copy + num_traits::Zero, K: MatMatMulKer<T>>(
k: usize,
loops: usize,
) -> f64 {
Expand Down
2 changes: 1 addition & 1 deletion linalg/matmul-bench/benches/matmul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn tract_blaslike(
FusedSpec::AddMatMul {
k,
a: a_storage.wrap(&pa.view()),
b: b_storage.wrap(&pb.view()).unwrap(),
b: b_storage.wrap(&pb.view()),
},
FusedSpec::Store(c_storage.wrap(&mut c.view_mut())),
],
Expand Down
2 changes: 1 addition & 1 deletion linalg/matmul-bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ pub fn tract(m: usize, k: usize, n: usize, a: &[f32], b: &[f32], c: &mut [f32])
FusedSpec::AddMatMul {
k,
a: a_storage.wrap(&pa.view()),
b: b_storage.wrap(&pb.view()).unwrap(),
b: b_storage.wrap(&pb.view()),
},
FusedSpec::Store(c_storage.wrap(&mut tc.view_mut())),
],
Expand Down

0 comments on commit cc91e4d

Please sign in to comment.