Skip to content

GPUmatrix

Basic Linear Algebra with GPU

v1.0.3 · Mar 26, 2026 · Artistic-2.0

Description

GPUs are great resources for data analysis, especially in statistics and linear algebra. Unfortunately, very few packages connect R to the GPU, and none of them are transparent enough to run the computations on the GPU without substantial changes to the code. The maintenance of these packages is cumbersome: several of the earlier attempts have been removed from their respective repositories. It would be desirable to have a properly maintained R package that takes advantage of the GPU with minimal changes to the existing code. We have developed the 'GPUmatrix' package (available on CRAN). 'GPUmatrix' mimics the behavior of the Matrix package and extends R to use the GPU for computations. It includes single(FP32) and double(FP64) precision data types, and provides support for sparse matrices. It is easy to learn, and requires very few code changes to perform the operations on the GPU. 'GPUmatrix' relies on either the 'Torch' or 'Tensorflow' R packages to perform the GPU operations. We have demonstrated its usefulness for several statistical applications and machine learning applications: non-negative matrix factorization, logistic regression and general linear models. We have also included a comparison of GPU and CPU performance on different matrix operations.

Downloads

CRAN

606

Last 30 days

5962nd

1.9K

Last 90 days

2.1K

Last year

Trend: +5.9% (30d vs prior 30d)

r2u

9

Last 30 days

51

Last 90 days

169

Last year

Trend: -70% (30d vs prior 30d)

r2u: no daily series yet

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 8 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 27, 2026

Version History

6 tracked
new 1.0.3 Mar 26, 2026
update 1.0.2 ← 1.0.1 diff Feb 29, 2024
update 1.0.1 ← 1.0.0 diff Nov 30, 2023
update 1.0.0 ← 0.1.1 diff Nov 26, 2023
update 0.1.1 ← 0.1.0 diff Oct 15, 2023
new 0.1.0 Apr 19, 2023