pub fn ptx_arch_runs_on_device(
compiled_arch: &str,
device_cc: (u32, u32),
) -> Result<(), ArchMismatch>Expand description
2026-09-25: Can PTX compiled for compiled_arch run on a device of
device_cc? Three rules:
- plain
sm_XYruns on any device with CC >= X.Y; sm_XYaruns only on CC == X.Y;sm_XYfruns on the same major version with CC >= X.Y.
A compiled_arch that is not an NVIDIA SM arch (gfx1151, metal3.1)
returns Ok(()), so AMD and Apple builds are never refused here. Callers
that need to tell the cases apart use parse_sm_arch, whose None is the
marker.