ArrayFire for AI

Still faster. Still portable. Now AI.

Use ArrayFire's accelerated core from the language your team already works in, then move between CUDA, OpenCL, oneAPI, and CPU execution without rewriting the model around each backend.

ArrayFire for AI

Bring accelerated array computing into the language your team already uses.

ArrayFire exposes one native compute core through C++, C, Python, Rust, Julia, Java, .NET, Fortran, Lua, Nim, and Node.js. Prototype in a productive language, move critical paths into native code when needed, and keep the same array model underneath.

11language interfaces for the same accelerated operations
1 corenative execution model beneath every frontend
4 pathsCUDA, OpenCL, oneAPI, and CPU deployment options

Where it fits

ArrayFire is useful where AI systems meet custom numerical work: preprocessing, tensor transforms, signal and image pipelines, model inference support, and native application integration.

DATA

Accelerated preparation

Keep normalization, filtering, transforms, feature extraction, and batch preparation close to the device.

OPS

Composable tensor operations

Express attention building blocks, reductions, indexing, matrix operations, and elementwise transforms with array primitives.

SHIP

Native deployment

Embed accelerated computation inside C++ applications without making a Python runtime the center of the production system.

11 Languages, One Accelerated Core

A tiny transformer attention forward pass, expressed through each ArrayFire frontend.

Now AI.

GPT-2 is implemented with ArrayFire in af-gpt2.cc (GitHub), a standalone, single C++ file. The code undertakes the following steps:

Take the same model from example to deployment.

Install ArrayFire, inspect the complete GPT-2 implementation, or discuss a production AI system with the engineering team.