check_sm_count

Function check_sm_count 

Source
pub fn check_sm_count(device_sms: u32, declared_sms: u32) -> Option<String>
Expand description

Does the running device have the SM count this build’s kernels were sized for? None when it agrees, Some(warning) when it does not.

§Why this WARNS and does not fail

kernels/<hw>/HARDWARE.toml [hardware] sm_count is a grid-sizing input. A wrong value costs a suboptimal grid, never a wrong answer, and refusing to boot on — say — an H100 PCIe with a different bin would be a regression dressed as rigour.

It exists at all because the defect it guards was exactly a silent wrong constant: atlas_core::device::sm121::NUM_SMS = 48, named after one part, compiled into a build for another, where a grid sized from it then ran 24 CTAs on 132 SMs for a whole campaign. A one-line boot warning naming both numbers is what would have caught it in round 1.