r-xla brings just-in-time compilation and automatic differentiation to R. Write standard R code, compile it to optimized machine code, and run it on CPU or GPU. It consists of many packages that are developed in tandem. The end-user facing package is anvil.
The core packages are:
| Package | Role |
|---|---|
| anvil | User-facing API: JIT compilation + autodiff |
| stablehlo | IR layer: create and manipulate StableHLO programs |
| pjrt | Runtime: compile and execute on CPU/CUDA/Metal via PJRT |
| tengen | Tensor generics |
| xlamisc | Shared utilities |
Some supporting repositories:
| Repository | Role |
|---|---|
| claude-config | Claude configuration for contributors |
| docker | Daily Docker images (CPU + CUDA) with anvil pre-installed |
| benchmarks | Performance comparisons against PyTorch and R torch |
| actions | Shared GitHub Actions and CI workflows |
| pjrt-builds | PJRT builds for Windows |