You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libNVVM backend floors for trap/breakpoint/pmevent (and tanh_approx_f32) encode PTX 9.3, making them unbuildable on the NVVM-IR route #519
Any device code whose panic/abort path reaches trap cannot compile through the NVVM-IR route (the route every libdevice-using module is forced onto, since emit_nvvm_ir = needs_libdevice). The build dies at export with:
Export failed: generated intrinsic `trap` (`v1:i0295`) requires PTX 9.3, newer than cuda-oxide can request
Cause: in generated_intrinsic_targets.rs, the LibNvvm backend requirement for trap encodes minimum_ptx: from_encoded(93):
and ptx_isa_requirement_for_floor tops out at 89..=90 => Ptx90, so the floor is unconditionally rejected — trap is unbuildable under libNVVM, period.
The floors look like an evidence-pipeline artifact rather than real ISA minima: the source recipe for the same intrinsic (cuda-intrinsics-gen/src/resolve.rs, debug_control_recipe) says minimum_ptx: "1.0" (PTX ISA §9.7.20.4 — trap has existed since PTX 1.0, and the LlvmNvptx backend floor for the same target is 3.2 with sm_20). 9.3 with sm_75 reads like the doc/probe version the evidence was collected against, not a floor.
Four generated targets carry from_encoded(93) under LibNvvm: trap, breakpoint, pmevent, tanh_approx_f32. The first three are PTX 1.x-era miscellaneous instructions; tanh.approx.f32 is PTX 7.0/sm_75.
Hit in practice: a physics shader crate using libdevice math plus ordinary bounds-check panics — every kernel with a panic path fails export. Locally overriding the trap floor to from_encoded(10) unblocks the build and the resulting cubins run correctly on sm_120, for whatever that's worth as evidence the floor is not real.
Happy to PR the change if you can point at where the fix belongs — the generated file itself, or the upstream evidence data it is rendered from.
Correction to the report: tanh_approx_f32 was a scan artifact on my side — its generated floors are a healthy 7.0/sm_80 on both backends. The only affected targets are the three debug-control intrinsics (trap, breakpoint, pmevent), and the floor turns out to be hardcoded in expand_debug_control_admission rather than coming from the evidence pipeline. PR with the source-level fix + regeneration: #520 (kept the sm_75 hardware floor — backend-codegen evidence must sit exactly at the hardware floor and CUDA 13 cannot probe older targets; the PTX floor alone was the blocker).
Activity
haixuanTao commentedon Jul 27, 2026
Correction to the report:
tanh_approx_f32was a scan artifact on my side — its generated floors are a healthy 7.0/sm_80 on both backends. The only affected targets are the three debug-control intrinsics (trap, breakpoint, pmevent), and the floor turns out to be hardcoded inexpand_debug_control_admissionrather than coming from the evidence pipeline. PR with the source-level fix + regeneration: #520 (kept the sm_75 hardware floor — backend-codegen evidence must sit exactly at the hardware floor and CUDA 13 cannot probe older targets; the PTX floor alone was the blocker).