Skip to content

Commit

Permalink
chore: separate test_sgemm_gpu/cpu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarflakstad committed Aug 16, 2024
1 parent 51f1c0b commit fea7140
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion crates/ratchet-core/src/ops/matmul/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,25 @@ def matmul(a, b{}):
}

#[proptest(cases = 64)]
fn test_sgemm(prob: SGEMMProblem) {
fn test_sgemm_gpu(prob: SGEMMProblem) {
let device = Device::request_device(DeviceRequest::GPU).unwrap();
let SGEMMProblem {
B,
M,
K,
N,
has_bias,
ref transpose,
} = prob;
println!(
"Running sgemm: B={} M={} N={} K={} has_bias={} transpose={:?}",
B, M, N, K, has_bias, transpose
);
run_matmul_trial(&device, prob).unwrap();
}

#[proptest(cases = 64)]
fn test_sgemm_cpu(prob: SGEMMProblem) {
let device = Device::request_device(DeviceRequest::CPU).unwrap();
let SGEMMProblem {
B,
Expand Down

0 comments on commit fea7140

Please sign in to comment.