pub fn device(cc: &str) -> Result<DeviceParams, ModelError>Expand description
Look up the capacity figures for a compute capability.
cc is matched exactly against DEVICES, so "8.6" resolves and
"8.60", "86" and "8" do not. An unlisted capability is an error
naming the ones that would have worked — never a nearest-neighbour
guess, because a fabricated capacity still yields an occupancy number
and an occupancy number is the sort of thing a reader believes.
let a10g = launchbound_model::device("8.6").unwrap();
assert_eq!(a10g.max_warps_per_sm, 48);
assert!(launchbound_model::device("6.1").is_err());