diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index f3d4992..4f7d7a4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,12 +7,14 @@ mod benchmark; mod e_core_selector; mod energy; mod freq; +mod model; mod scheduler; #[rustfmt::skip] mod bpf; use anyhow::Result; +use burn::tensor::Tensor; use clap::{Arg, ArgAction, Command}; use scheduler::Scheduler; use std::mem::MaybeUninit; @@ -46,13 +48,26 @@ fn main() -> Result<()> { ) .get_matches(); + let model = model::load_model(); + let device = Default::default(); + let result = model.forward(Tensor::from_floats( + [ + // 2899.97, 21420886., 59226., 148084., 301003., 36244800., 115862107., 43766905., + 1533, 1077473, 9448, 4269, 52805, 2456984, 5867215, 3954587, + ], + // [1., 1., 1., 1., 1., 1., 1., 1.], + &device, + )); + + println!("result: {}", result); + let power_cap = *matches.get_one::<u64>("power_cap").unwrap_or(&u64::MAX); let use_mocking = matches.get_flag("mock"); let benchmark = matches.get_flag("benchmark"); // Initialize and load the scheduler. let mut open_object = MaybeUninit::uninit(); - let log_path = "logs.csv"; + let log_path = "/tmp/logs.csv"; if benchmark { let mut sched = BenchmarkScheduler::init(&mut open_object, log_path)?; sched.run(); |
