Skip to contents

Prints a human-readable diagnostic showing which backend was chosen for op on x, the accept/reject status of every candidate backend, and actionable suggestions for improving performance.

Usage

amatrix_explain(x, op, y = NULL)

Arguments

x

An aMatrix object.

op

Character string. Operation to explain, e.g. "matmul", "crossprod", "svd".

y

Right-hand-side aMatrix or NULL. Supply for binary operations to include workload-specific advice.

Value

Invisibly, the dispatch plan list from amatrix_backend_plan. Called primarily for its printed output.

Examples

m <- adgeMatrix(matrix(1:12, 3, 4))
amatrix_explain(m, "matmul")
#> ── amatrix dispatch: matmul ──────────────────────────────────────────── 
#>   object:    adgeMatrix [3 × 4]  precision=strict  preferred=cpu
#>   residency: host (not GPU-resident)
#> 
#> ── candidates ────────────────────────────────────────────────────────── 
#>   ► CHOSEN   cpu            reg avail prec cold calib   [cold]
#> 
#> ── result ────────────────────────────────────────────────────────────── 
#>   chosen: cpu  via cold path (upload + compute)
#> 
#> ────────────────────────────────────────────────────────────────────────