//! Print every device the HAL discovers, with the capabilities it reports. //! //! Run it on the host whose fabric you want to see: //! cargo run --example devices --features rocm fn main() { match jouleclaw_omni::hal::discover_devices() { Ok(devices) if devices.is_empty() => println!("no devices discovered"), Ok(devices) => { for d in &devices { println!("{:?} {:?}", d.device_type, d.name); println!( " memory total {} MiB, available {} MiB, est {} GB/s", d.memory.total / (1024 * 1024), d.memory.available / (1024 * 1024), d.memory.bandwidth_gbps ); let c = &d.capabilities; println!( " compute {} units, {} threads/unit, warp {}, shared/block {} KiB", c.compute_units, c.max_threads_per_unit, c.warp_size, c.max_shared_memory / 1024 ); println!( " types f16 {} bf16 {} f8 {} int8 {}, matrix {:?}", c.supports_f16, c.supports_bf16, c.supports_f8, c.supports_int8, c.matrix_unit ); } } Err(e) => println!("discovery failed: {e}"), } }