Module fault

Module fault 

Source
Expand description

2026-09-25: Process-wide latch for a destroyed CUDA context, the probe-based verdict that sets it, and the exit status it maps to.

classify decides from a probe result, not from the failing call’s error code or text: the gpu-runtime fault probe (cuda_backend/fault_probe.rs) passes the result of cuStreamSynchronize on the default stream, issued after the failure. The latch is read by the request middleware (gpu_fault_middleware), /health and /health/live, the scheduler, and main’s exit path.

Owner: core. Invariants:

  • A FaultLatch is set at most once, and keeps the first reason.
  • is_faulted() is true exactly when fault() is Some: both read the same OnceLock<String>, so no reader sees one without the other.

Structs§

FaultLatch
2026-09-25: A one-shot, first-writer-wins fault flag.

Enums§

Fatality
2026-09-25: The verdict for one failed GPU operation.

Constants§

EXIT_GPU_FAULT
2026-09-25: Exit status of a process whose CUDA context was lost: nonzero, and distinct from the status 1 of an ordinary failure (exit_code).

Functions§

classify
2026-09-25: Decide whether a failed GPU operation destroyed the context.
exit_code
2026-09-25: The process exit status for a run that is ending: a latched fault gives EXIT_GPU_FAULT whatever the run’s own result, otherwise 0 for success and 1 for failure. main exits through this, so a run that ended after a fault does not exit 0.
global
2026-09-25: The process-wide latch that the fault probe sets and the server reads.