← Back to all sparks
R

Rmlx

AI-ASSISTANTS
Velocity0.0

R Interface to MLX Arrays (GPU-Accelerated with Metal or CUDA)

Rmlx spent its first six months deciding where an array actually lives.

apple-silicongpu-computingarray-frameworkmlxautodiffr-package
Current state
Rmlx exposes Apple's MLX array framework to R, giving R users GPU-backed array operations and automatic differentiation on Apple silicon. It reached r-universe in November 2025 and has moved quickly since: float64 arrays in 0.3.0, a reworked device model in the same release, and dimnames and vector names in 0.4.0 that make mlx objects behave like base R arrays under solve(), %*% and friends.
Where it's heading
The work so far is about making MLX arrays feel native to R rather than exposing more of MLX. Dimnames preservation across operations, rbind() and cbind() accepting 1D vectors, base-like subsetting semantics with errors on unknown names — these are all conformance to R's conventions. The device rework points the same way: rather than mirror MLX's per-array device, the package adopted scoped context functions that read like R idiom. Expect the surface to keep widening before it deepens.
Prediction
The obvious next targets are more base R generics preserving dimnames and broader coverage of MLX operations; float64 GPU support is blocked upstream by MLX itself, which the notes state directly.

Recent moves

  1. 2mo ago

    Dimnames and vector names added, preserved across operations

    mlx objects gain row, column and dimnames, and vectors gain names, with semantics deliberately matched to base R — NULL allowed per dimension, unknown names an error. Crucially the names survive solve(), %*% and other operations rather than being dropped at the first computation.

    View source ↗
  2. 3mo ago

    Arrays lose their device; scoped device contexts replace it

    ⚡ SPARK

    The release that settled the package's core abstraction. Detaching device from the array and moving it to scoped context functions is the decision every later feature is built on, and it exposed that the old model had never really worked.

    View source ↗
  3. 8mo ago

    mlx_grad handles length-1 return values

    A narrow fix so the gradient function copes with length-1 vectors returned from the supplied function. Early-days edge case in the autodiff path.

    View source ↗
  4. 8mo ago

    First release on r-universe

    The package's public starting point, with no detail in the release record beyond the fact of publication. Everything assessable about Rmlx comes from the three releases after it.

    View source ↗