Choose a residency-capable accelerator backend for a hot path
Source:R/resident-select.R
amatrix_resident_backend_for.RdReturns the first available non-CPU backend that can keep x resident
for the requested operation. This is intended for package authors who want
repeated work to stay on the fastest available accelerator without hardcoding
backend names such as "metal" or "mlx".