Is it possible to use the GPU for calculations? (e.g. CUDA/OpenCL)


5 Answers 5


As of 2012, your best bet was to implement your computation as a fragment shader in GLSL ES and find a way to represent the output as a RGBA (32-bit) texture.

Eben stated in this 2012 talk that OpenCL is not likely to be implemented, but that there may be an API developed in the future; the answer starts at 21:20, and Eben says "we may provide some way for people to get some of that general purpose compute out".

Recent developments such as the VC4CL project have attempted to implement OpenCL on the VideoCore IV GPU used by the Raspberry Pi, and other related projects now provide access to some of the general compute power of the GPU.

  • 6
    AFAIK that talk is the most definitive answer so far... the answer starts at 21:20, and Eben says "we may provide some way for people to get some of that general purpose compute out"
    – je4d
    Commented Jun 12, 2012 at 22:31
  • 5
    Some of the GPU code has been opensourced! github.com/raspberrypi/userland Commented Oct 25, 2012 at 0:14
  • It is equivalent to implementing OpenCL, as someone can just add a VideoCore OpenCL backend to LLVM to compile OpenCL to VC. Commented Apr 11, 2015 at 4:58
  • 3
    The situtation has changed in 2014 with the official release of documentation and various blogposts about GPGPU on the official blog itself.
    – flakeshake
    Commented Jan 11, 2016 at 13:22

Not at present - there is only a framebuffer interface for display purposes. There is no OpenCL and no plans for it nor is there documentation available to create OpenCL. CUDA is Nvida only so isn't applicable. Once an OpenGL driver becomes available you may be able to engineer some calculations via the GPU but how useful that will be remains to be seen.

Check out this detailed thread on the RPi forum: GPU Processing API


This one may be useful.. GPGPU python library for the raspberry pi. https://github.com/nineties/py-videocore

A general-purpose GPU (GPGPU) is a graphics processing unit (GPU) that performs non-specialized calculations that would typically be conducted by the CPU


The Raspberry Pi foundation has been endorsing GPGPU on the Pi since 2014 , shortly after Broadcom released documentation for the QPU units inside the GPU.

An experimental OpenCL compiler was created by Simon J. Hall (the winner of the tightly related 2014 10,000 $ competition to make Quake run acceptably without using the GPU BLOB) : see here.


You can write high-level programs that run on the Pi's GPU using QPULib:


It's a programming language and compiler targeting the 12 vector processors (QPUs) inside the Pi's GPU. It aims to be easy to use and is implemented as an EDSL (Embedded Domain Specific Language) -- a lightweight alternative to a full-blown OpenCL backend.

Not the answer you're looking for? Browse other questions tagged or ask your own question.