Module arch

Module arch 

Source
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§

ArchMismatch
SmArch

Enums§

SmSuffix
2026-09-25: The suffix on an sm_XY… architecture string. It selects the compatibility rule in ptx_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_arch run on a device of device_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. None means no target ships for that capability.