Skip to contents

Accelerated array computing and code transformations for R. Numerical programs operating on multi-dimensional arrays can be just-in-time compiled to optimized executables via 'XLA' – the same compiler that powers 'JAX' and 'TensorFlow' – and run on CPU or NVIDIA GPU from the same source. Also provides reverse-mode automatic differentiation, returning the gradient of a function as another R function.

Options

Environment variables

  • ANVL_DEFAULT_DTYPES: category=dtype pairs such as "float=f64,int=i64", used for every backend when the anvl.default_dtypes option is not set.

  • ANVL_DEFAULT_DEVICE: a device identifier such as "cuda" or "cpu:1", used when the anvl.default_device option is not set.

Both are read once, when anvl is loaded.

The remaining ones, all prefixed ANVL_TEST, affect only anvl's own test suite, not the package:

  • ANVL_TEST: tests/testthat.R runs the tests only when this is "1", so R CMD check in a shell without it runs none of them.

  • ANVL_TEST_SKIP_QUICKR: when set to anything non-empty, the tests that need the quickr backend are skipped – they are comparatively slow.

Third-Party Licenses

The anvl package itself is MIT-licensed. The CUDA backend dynamically loads NVIDIA software which is not bundled with anvl, but downloaded from NVIDIA's official redistributable channels by the CUDA toolkit R package (e.g. pjrt.cuda) at install time. Its use is governed by the NVIDIA CUDA Toolkit EULA, with the exception of cuDNN, which is covered by the NVIDIA cuDNN SLA, and NCCL, which is covered by its own license. By installing or using the CUDA backend you accept those terms.

Author

Maintainer: Sebastian Fischer seb.fischer@tutamail.com (ORCID)

Authors:

Other contributors: