Skip to contents

Executes a small matmul round-trip against the named backend and compares the result to the base R reference. On success the backend is marked healthy; on failure it is marked unhealthy:<reason>. Subsequent calls to amatrix_backend_status() reflect the recorded health.

Usage

amatrix_backend_health_probe(name, tol = NULL)

Arguments

name

Character string. Name of a registered backend.

tol

Numeric. Residual tolerance for the probe, default 1e-8 (float64) or 1e-4 (if the backend only supports fast precision).

Value

Invisibly, the health record as a list with elements status, reason, timestamp.

Details

The probe is intentionally tiny (10x10 double-precision matmul) so it completes in milliseconds even on cold GPU. It is not a benchmark; it is a liveness check.

Examples

amatrix_backend_health_probe("cpu")