Module tvm_sys::device [−][src]
Expand description
Provides Device
and related device queries.
Create a new device for device type and device id.
Example
let cpu = DeviceType::from("cpu");
let dev = Device::new(cpu , 0);
let cpu0 = Device::cpu(0);
assert_eq!(dev, cpu0);
Or from a supported device name.
use tvm_sys::Device;
let cpu0 = Device::from("cpu");
println!("{}", cpu0);
Structs
Enums
Device type represents the set of devices supported by TVM.