Skip to content
Snippets Groups Projects

Set up cava benchmark

Merged rarbore2 requested to merge cava_opt_3 into main
Files
3
@@ -4,14 +4,16 @@
use hercules_rt::CUDABox;
use hercules_rt::{runner, HerculesImmBox, HerculesImmBoxTo};
use aligned_vec::ABox;
juno_build::juno!("dot");
fn main() {
async_std::task::block_on(async {
let a: [f32; 8] = [0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0];
let b: [f32; 8] = [0.0, 5.0, 0.0, 6.0, 0.0, 7.0, 0.0, 8.0];
let a = HerculesImmBox::from(&a as &[f32]);
let b = HerculesImmBox::from(&b as &[f32]);
let a: ABox<[f32; 8]> = ABox::new(32, [0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0]);
let b: ABox<[f32; 8]> = ABox::new(32, [0.0, 5.0, 0.0, 6.0, 0.0, 7.0, 0.0, 8.0]);
let a = HerculesImmBox::from(a.as_ref() as &[f32]);
let b = HerculesImmBox::from(b.as_ref() as &[f32]);
let mut r = runner!(dot);
let c = r.run(8, a.to(), b.to()).await;
println!("{}", c);
Loading