Expand description
Shared CUDA driver presence/loading helpers used by every cuBLAS / cuSPARSE / cuSOLVER routing module.
The GPU path uses ONE context model: cudarc’s device PRIMARY context
(cuDevicePrimaryCtxRetain, bound in device_runtime::cuda_context_for).
cuBLAS/cuSOLVER/cuSPARSE handles attach to that current context; there is no
separate user cuCtxCreate context (its removal fixed the #1017
NOT_INITIALIZED handle failures). This module keeps only the libcuda
presence probes, byte-size/layout helpers, and the check_cuda status wrap.
Functions§
- array_
from_ row_ major - Wrap a row-major flat buffer of shape
(rows, cols)as anArray2<f64>without permutation. The buffer is consumed (no copy when its length matches). ReturnsNoneon a length mismatch. - check_
cuda - cuda_
driver_ available - Lossless CUDA-driver presence probe.
Ok(false)means every candidate was genuinely absent; loader/ABI/transitive-dependency faults remainErr. - cuda_
library_ candidates - from_
col_ major - from_
col_ major_ inplace - Convert a column-major flat buffer back into row-major
Array2<f64>. - preload_
cuda_ driver - require_
cuda_ compute_ library - Require that the platform loader can open the named CUDA compute library
(
cublas,cusolver,cusparse) from the one selected userspace stack. - to_
col_ major - Repack a 2D
ndarray::ArrayBase(row-major) into the column-major layout expected by every cuBLAS / cuSOLVER entry point. - to_i32
- to_
row_ major - Borrow (or pack) a 2D array’s buffer in ROW-major (C) order.