Expand description
2026-09-25: Decide whether PTX built for one SM architecture runs on a device, and name the target to rebuild when it does not.
A kernel build compiles for the single arch in kernels/<hw>/HARDWARE.toml
[hardware].arch (one -arch= flag per nvcc call), so a binary and a GPU
can disagree. The CUDA preflight (arch_preflight::check_arch) calls
ptx_arch_runs_on_device, and --check-kernels reads the resulting
ArchMismatch (serve_phases/kernel_gate.rs).
Owner: core.
Invariants: every function here is pure; the module uses only std, so it
needs no GPU and no driver.
Structs§
Enums§
- SmSuffix
- 2026-09-25: The suffix on an
sm_XY…architecture string. It selects the compatibility rule inptx_arch_runs_on_device.
Functions§
- parse_
sm_ arch - 2026-09-25: Parse an NVIDIA
sm_XY[a|f]architecture string. - ptx_
arch_ runs_ on_ device - 2026-09-25: Can PTX compiled for
compiled_archrun on a device ofdevice_cc? Three rules: - target_
hint - 2026-09-25: Which
kernels/<hw>/target ships for a device compute capability, so the mismatch message can say what to rebuild.Nonemeans no target ships for that capability.