From fea714044400e864142aba19db7b7b8ed0d6d4ec Mon Sep 17 00:00:00 2001 From: Ivar Flakstad <69173633+ivarflakstad@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:08:21 +0200 Subject: [PATCH] chore: separate test_sgemm_gpu/cpu tests --- crates/ratchet-core/src/ops/matmul/mod.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/crates/ratchet-core/src/ops/matmul/mod.rs b/crates/ratchet-core/src/ops/matmul/mod.rs index dfbf7640..597a2165 100644 --- a/crates/ratchet-core/src/ops/matmul/mod.rs +++ b/crates/ratchet-core/src/ops/matmul/mod.rs @@ -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,