Package: cudaverse 0.4.1.9000

Yaoxiang Li

cudaverse: Lightweight 'CUDA' Numerical Computing

Provides a lightweight interface to graphics processing unit (GPU)-accelerated numerical computing using 'CUDA'. Dense tensors, sparse matrices, decompositions, distances, exact nearest neighbours, clustering, graph workflows, and embeddings share one consistent interface. The native backend discovers the 'NVIDIA CUDA Driver API', 'cuBLAS', and 'cuSOLVER' libraries at runtime without bundling 'LibTorch' or the 'CUDA Runtime'. Stage-level provenance records the backend, device, and data transfers used by each result. A portable implementation supports package validation on systems without 'CUDA'. Background for the included Leiden community detection and uniform manifold approximation and projection methods is given by Traag, Waltman and van Eck (2019) <doi:10.1038/s41598-019-41695-z> and McInnes et al. (2018) <doi:10.21105/joss.00861>, respectively.

Authors:Yaoxiang Li [aut, cre]

cudaverse_0.4.1.9000.tar.gz
cudaverse_0.4.1.9000.zip(r-4.7-x86_64)cudaverse_0.4.1.9000.zip(r-4.7-arm64)cudaverse_0.4.1.9000.zip(r-4.6-x86_64)cudaverse_0.4.1.9000.zip(r-4.6-arm64)cudaverse_0.4.1.9000.zip(r-4.5-x86_64)
cudaverse_0.4.1.9000.tgz(r-4.6-x86_64)cudaverse_0.4.1.9000.tgz(r-4.6-arm64)cudaverse_0.4.1.9000.tgz(r-4.5-x86_64)cudaverse_0.4.1.9000.tgz(r-4.5-arm64)
cudaverse_0.4.1.9000.tar.gz(r-4.7-arm64)cudaverse_0.4.1.9000.tar.gz(r-4.7-x86_64)cudaverse_0.4.1.9000.tar.gz(r-4.6-arm64)cudaverse_0.4.1.9000.tar.gz(r-4.6-x86_64)
cudaverse_0.4.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
cudaverse/json (API)

# Install 'cudaverse' in R:
install.packages('cudaverse', repos = c('https://cudaverse.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/cudaverse/cudaverse/issues

Pkgdown/docs site:https://cudaverse.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cudagpuscientific-computingtensorscpp

5.60 score 2 stars 396 downloads 39 exports 2 dependencies

Last updated from:f93361d40d. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK480
linux-devel-x86_64OK398
source / vignettesOK392
linux-release-arm64OK482
linux-release-x86_64OK389
macos-release-arm64OK196
macos-release-x86_64OK376
macos-oldrel-arm64OK188
macos-oldrel-x86_64OK500
windows-devel-arm64OK406
windows-devel-x86_64OK178
windows-release-arm64OK389
windows-release-x86_64OK159
windows-oldrel-x86_64OK151
wasm-releaseOK180

Exports:as_adjacency_matrixas_cooas_csrcuda_availablecuda_diagnosticscuda_diffusion_mapcuda_distancecuda_kmeanscuda_knncuda_knn_graphcuda_leidencuda_louvaincuda_memory_infocuda_pcacuda_provenancecuda_select_devicecuda_sparsecuda_stagecuda_svdcuda_tensorcuda_tsnecuda_umapembedding_coordinatessparse_col_sumssparse_infosparse_matmul_densesparse_matvecsparse_normalizesparse_row_sumstensor_broadcast_totensor_devicetensor_matmultensor_meantensor_reshapetensor_shapetensor_sumto_cputo_deviceto_dgCMatrix

Dependencies:latticeMatrix

Performance and package size
Choose precision for the workload | What was compared? | Selected full-benchmark results | Small workloads can be faster without CUDA | Why can the native pipeline be faster? | Installed footprint | When cudaverse is a good fit | Reproduce and interpret the evidence

Last update: 2026-10-13
Started: 2026-08-20

Set up CUDA for cudaverse
Platform support | 1. Install and verify the NVIDIA driver | 2. Install CUDA 12.x | Windows | Linux | macOS | 3. Install cudaverse | 4. Check that cudaverse can use CUDA | 5. Run a strict CUDA smoke test | Common problems | nvidia-smi fails | cublas_loaded or cusolver_loaded is false | CUDA is found, but the test calculation fails | CUDA runs out of memory | A graph or embedding result contains a non-CUDA stage

Last update: 2026-10-13
Started: 2026-08-11

What runs on CUDA?
CUDA task summary | Dense CUDA example | Sparse CUDA example | Graph and embedding workflows | The lightweight backend

Last update: 2026-09-26
Started: 2026-08-10

Your first CUDA workflow with cudaverse
Before you start | PCA and exact nearest neighbours on CUDA | GPU-resident matrix operations | Sparse normalization, PCA, and kNN | Other CUDA tasks | Where to go next

Last update: 2026-09-26
Started: 2026-08-06

Keep an R workflow on the GPU
Require CUDA at the start | Upload once and reuse the tensor | Keep PCA followed by kNN on CUDA | Keep sparse preprocessing on CUDA | Read provenance | Control memory and transfer costs | Confirm the backend used

Last update: 2026-08-20
Started: 2026-07-26

Readme and manuals

Help Manual

Help pageTopics
Extract a graph adjacency matrixas_adjacency_matrix
Convert sparse storage formatas_coo as_csr
Detect a usable CUDA backendcuda_available
Diagnose the optional CUDA runtimecuda_diagnostics
Diffusion-map-style embeddingcuda_diffusion_map
Pairwise distances with an optional CUDA backendcuda_distance
GPU-aware k-means clusteringcuda_kmeans
k-nearest neighbourscuda_knn
Build a sparse graph from nearest neighbourscuda_knn_graph
Cluster a graph with Leidencuda_leiden
Cluster a graph with Louvaincuda_louvain
Inspect CUDA memorycuda_memory_info
GPU-aware principal component analysiscuda_pca
Inspect actual compute provenancecuda_provenance cuda_provenance.default
Select a computation device without hiding fallbackcuda_select_device
Create a GPU-aware sparse matrixcuda_sparse
Record one compute stagecuda_stage
GPU-aware singular value decompositioncuda_svd
Create a GPU-aware tensorcuda_tensor
t-SNE embeddingcuda_tsne
UMAP embeddingcuda_umap
Arithmetic operators for GPU-aware tensors%*%.cudatensor cudatensor-operators Ops.cudatensor
Subset and replace tensor valuescudatensor-subset [.cudatensor [<-.cudatensor
Inspect sparse matrix dimension labelsdimnames.cudasparse
Inspect tensor dimension labelsdimnames.cudatensor
Extract embedding coordinatesembedding_coordinates
Assign observations with a fitted CUDA-aware k-means modelpredict.cuda_kmeans
Project observations with a fitted CUDA-aware PCA modelpredict.cuda_pca
Inspect sparse matrix metadatasparse_info
Sparse matrix by dense matrix multiplicationsparse_matmul_dense
Sparse matrix-vector multiplicationsparse_matvec
Normalize sparse rows or columns without densifyingsparse_normalize
Sparse row and column reductionssparse_col_sums sparse_row_sums
Transpose a GPU-aware sparse matrixt.cudasparse
Broadcast a tensor to a compatible shapetensor_broadcast_to
Inspect tensor device and backendtensor_device
Matrix multiplication for tensorstensor_matmul
Reshape a tensor without changing its valuestensor_reshape
Inspect tensor shapetensor_shape
Tensor reductionstensor_mean tensor_sum
Transfer tensor data to base Rto_cpu
Transfer a tensor to a deviceto_device
Convert to an R sparse matrixto_dgCMatrix