mirror of https://github.com/tracel-ai/burn.git
[backend-comparison] Add Operating System information (#1531)
* [backend-comparison] Add Operating System information * [backend-comparison] Simplify serialization of os info
This commit is contained in:
parent
5bac300688
commit
28233d9f59
|
@ -205,6 +205,7 @@ dependencies = [
|
|||
"derive-new",
|
||||
"dirs 5.0.1",
|
||||
"github-device-flow",
|
||||
"os_info",
|
||||
"rand",
|
||||
"ratatui",
|
||||
"reqwest",
|
||||
|
@ -216,6 +217,7 @@ dependencies = [
|
|||
"strum_macros",
|
||||
"sysinfo",
|
||||
"wgpu",
|
||||
"wsl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3190,6 +3192,17 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||
|
||||
[[package]]
|
||||
name = "os_info"
|
||||
version = "3.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "os_str_bytes"
|
||||
version = "6.6.1"
|
||||
|
@ -5437,6 +5450,12 @@ dependencies = [
|
|||
"syn 2.0.55",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wsl"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8dab7ac864710bdea6594becbea5b5050333cf34fefb0dc319567eb347950d4"
|
||||
|
||||
[[package]]
|
||||
name = "x11rb"
|
||||
version = "0.13.0"
|
||||
|
|
|
@ -90,9 +90,11 @@ text_placeholder = "0.5.0"
|
|||
pollster = "0.3"
|
||||
wgpu = "0.18.0"
|
||||
|
||||
# Burnbench
|
||||
# Benchmarks and Burnbench
|
||||
arboard = "3.3.2"
|
||||
github-device-flow = "0.2.0"
|
||||
os_info = "3.8.2"
|
||||
wsl = "0.1.0"
|
||||
|
||||
bincode = { version = "2.0.0-rc.3", features = [
|
||||
"alloc",
|
||||
|
|
|
@ -34,7 +34,8 @@ clap = { workspace = true }
|
|||
crossterm = { workspace = true, optional = true }
|
||||
derive-new = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
github-device-flow = { workspace = true }
|
||||
github-device-flow = { workspace = true }
|
||||
os_info = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
ratatui = { workspace = true, optional = true }
|
||||
reqwest = {workspace = true, features = ["blocking", "json"]}
|
||||
|
@ -44,6 +45,7 @@ strum = { workspace = true }
|
|||
strum_macros = { workspace = true }
|
||||
sysinfo = { workspace = true, features = ["serde"] }
|
||||
wgpu = { workspace = true }
|
||||
wsl = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
rstest = { workspace = true }
|
||||
|
|
|
@ -8,6 +8,23 @@ use wgpu;
|
|||
pub(crate) struct BenchmarkSystemInfo {
|
||||
cpus: Vec<String>,
|
||||
gpus: Vec<String>,
|
||||
os: BenchmarkOSInfo,
|
||||
}
|
||||
|
||||
#[derive(Default, Clone, Serialize, Deserialize)]
|
||||
pub(crate) struct BenchmarkOSInfo {
|
||||
name: String,
|
||||
#[serde(rename = "wsl")]
|
||||
windows_linux_subsystem: bool,
|
||||
}
|
||||
|
||||
impl From<os_info::Info> for BenchmarkOSInfo {
|
||||
fn from(info: os_info::Info) -> Self {
|
||||
BenchmarkOSInfo {
|
||||
name: format!("{}", info),
|
||||
windows_linux_subsystem: wsl::is_wsl(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl BenchmarkSystemInfo {
|
||||
|
@ -15,6 +32,7 @@ impl BenchmarkSystemInfo {
|
|||
Self {
|
||||
cpus: BenchmarkSystemInfo::enumerate_cpus(),
|
||||
gpus: BenchmarkSystemInfo::enumerate_gpus(),
|
||||
os: BenchmarkOSInfo::from(os_info::get()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue