GPU acceleration for GNU Octave – OpenCL 1.2 based, works on many devices.
AnyArray (formerly Octave OCL Extra) is a free and open‑source software project that brings GPU compute capabilities to GNU Octave. It extends the original Octave OCL project with broader device support, including PC hardware (AMD, Intel, NVIDIA) and mobile platforms (Qualcomm Adreno, ARM Mali) via Android Termux.
After extensive testing and tuning to ensure reliable operation on a wide range of devices, the project was renamed AnyArray in March 2026 – reflecting its commitment to “work on any device”. The core promise remains unchanged: to provide OpenCL‑accelerated array operations for the open‑source community.
AnyArray currently supports the OpenCL 1.2 API and is designed to be both portable and performant.
Note: The project is maintained by Prof. Jinchuan Tang (jctang@gzu.edu.cn).
For his research profile, visit ResearchGate.
- Broad hardware support: AMD, Intel, NVIDIA (CPUs/GPUs), Apple Silicon GPUs, Qualcomm Adreno, ARM Mali (via Android Termux)
- OpenCL 1.2 compliant: Works with standard OpenCL runtimes
- Enhanced OpenCL kernels: Optimised for real‑world performance
- Microsoft OpenCL/OpenGL compatibility pack support
- POCL runtime support on CPU (Portable Computing Language)
- Mesa RustiCL support
- No memory issues on AMD CPUs (stability fix over older versions)
- Works on Android: Use with Termux for mobile GPU compute
- Easy integration with GNU Octave
The maintainer actively invites users to join the tuning effort for clBLAST to speedup BLAS on GPUs:
"Please join my summon to tuning your GPU to make clBLAST better" –
CLBlast issue #1 comment
| Category | Examples |
|---|---|
| PC CPUs/GPUs | AMD, Intel, NVIDIA |
| Apple Silicon | M1 / M2 / M3 GPUs |
| Mobile GPUs | Qualcomm Adreno, ARM Mali (via Android Termux) |
| OpenCL runtimes | Official drivers, POCL, RustiCL, Microsoft OpenCL/OpenGL compatibility pack |
| Operating systems | Linux, Windows (with compatibility pack), macOS, Android (Termux) |
- GNU Octave (with development headers)
- OpenCL 1.2 or later (runtime + ICD)
- C++ compiler with C++11 support
- (NEXT) clBLAST for accelerated matrix multiplication
- Clone the repository: git clone https://github.com/octaveoclx/AnyArray.git cd AnyArray
After successful compilation, you can load the module in Octave:
pkg load ocl
Then create GPU arrays and perform operations:
A = gpuArray(rand(1000)); B = gpuArray(rand(1000)); C = A * B; # automatically uses clBLAST if available
Refer to the original Octave OCL license - GNU GENERAL PUBLIC LICENSE and any additional notes in the source files.
- Maintainer: Prof. Jinchuan Tang – jctang@gzu.edu.cn
- ResearchGate: https://www.researchgate.net/profile/Jinchuan-Tang-4
Issues, pull requests, and tuning contributions are welcome.