bench: explicitly specify spirv backend

This commit is contained in:
2022-07-27 16:37:56 -07:00
parent d5c4e13b84
commit 48e8f5d1b4

View File

@@ -1,6 +1,6 @@
use coremem::{self, Driver, GenericSim};
use coremem::sim::legacy::SimState;
use coremem::sim::spirv::SpirvSim;
use coremem::sim::spirv::{SpirvSim, WgpuBackend};
use coremem::geom::Index;
use std::time::{Instant, Duration};
@@ -23,26 +23,26 @@ fn measure_steps<S: GenericSim + Clone + Default + Send + Sync + 'static>(name:
fn main() {
coremem::init_logging();
measure_steps("spirv/80", 1, Driver::<SpirvSim>::new_spirv(
Index::new(80, 80, 80), 1e-3
measure_steps("spirv/80", 1, Driver::<SpirvSim>::new_with_state(
SpirvSim::new(Index::new(80, 80, 80), 1e-3, WgpuBackend::default())
));
measure_steps("sim/80", 1, Driver::<SimState>::new_with_state(
SimState::new(Index::new(80, 80, 80), 1e-3)
));
measure_steps("spirv/80 step(2)", 2, Driver::<SpirvSim>::new_spirv(
Index::new(80, 80, 80), 1e-3
measure_steps("spirv/80 step(2)", 2, Driver::<SpirvSim>::new_with_state(
SpirvSim::new(Index::new(80, 80, 80), 1e-3, WgpuBackend::default())
));
measure_steps("sim/80 step(2)", 2, Driver::<SimState>::new_with_state(
SimState::new(Index::new(80, 80, 80), 1e-3)
));
measure_steps("spirv/80 step(10)", 10, Driver::<SpirvSim>::new_spirv(
Index::new(80, 80, 80), 1e-3
measure_steps("spirv/80 step(10)", 10, Driver::<SpirvSim>::new_with_state(
SpirvSim::new(Index::new(80, 80, 80), 1e-3, WgpuBackend::default())
));
measure_steps("sim/80 step(10)", 10, Driver::<SimState>::new_with_state(
SimState::new(Index::new(80, 80, 80), 1e-3)
));
measure_steps("spirv/80 step(100)", 100, Driver::<SpirvSim>::new_spirv(
Index::new(80, 80, 80), 1e-3
measure_steps("spirv/80 step(100)", 100, Driver::<SpirvSim>::new_with_state(
SpirvSim::new(Index::new(80, 80, 80), 1e-3, WgpuBackend::default())
));
measure_steps("sim/80 step(100)", 100, Driver::<SimState>::new_with_state(
SimState::new(Index::new(80, 80, 80), 1e-3)