I am wondering if someone can use CUDA and (or) OpenCL on a Raspberry Pi as in any normal PC equipped with a GPU. The main processor runs at 700 MHz and maybe will be slow for some imaging applications unless it can exploit the embedded GPU!

I will try to answer my question as soon as I get the hardware but in the meantime I couldn't resist asking.

  • 1
  • $\begingroup$ So the answer is "not yet" for OpenCL - i hope. Thanks @Szabolcs $\endgroup$
    – tchronis
    Nov 24, 2013 at 16:47
  • 1
    $\begingroup$ CUDA is definite "no" since RPi has no Nvidia hardware. OpenCL is more open to speculation. $\endgroup$
    – kirma
    Nov 24, 2013 at 18:48
  • 1
    $\begingroup$ This question appears to be off-topic because it is about issues outside Wolfram Language on the RaspberryPi $\endgroup$
    – m_goldberg
    Nov 25, 2013 at 0:46
  • $\begingroup$ OpenCL and CUDA also requires powerful adapter, which would triple the cost to build from the already cheap price of the device itself. $\endgroup$
    – yshk
    Nov 25, 2013 at 5:11

2 Answers 2



There has been some forward progress in performing calculations on the RPi GPU. A recent post in the Raspberry Pi forums introduces a library that can be used to perform FFT on the GPU, which is claimed to be 10 times faster than performing the calculations on the ARM and almost twice as fast and doing the calculations by hand.

There are lengthy discussions on the Raspberry Pi forum bemoaning the lack of OpenCL on the Raspberry Pi. While I would like to be proven wrong, I feel fairly confident in saying that OpenCl is not and will not be supported on the RPi. The reason is the proprietary nature of the Videocore GPU, and there is no indication that Broadcom is either working or plans to work on an OpenCL implementation.

That said, the eternal optimists can look here for an ambitious reverse-engineering project, or they can fantasize about CUDA implementation with a virtual GPU on the raspberry pi.

None of these solutions will be of much use to Mathematica users.

  • 2
    $\begingroup$ "... and almost twice as fast and (sic) doing the calculations by hand." LOL! :) $\endgroup$
    – kirma
    Feb 1, 2014 at 20:58
  • 1
    $\begingroup$ Commonly supporting standards such as OpenCL (or a specific version of a standard) is limited by original design target of the device under consideration. I don't think VideoCore in Raspberry Pi SoC was ever designed for the purpose of being OpenCL compliant, and this may prevent an efficient implementation of that standard - no matter how hard they would try. $\endgroup$
    – kirma
    Feb 1, 2014 at 21:06

I am working on a RBPi with a new imager development. I am using CUDA under the Mathematica kernel located in another computer with the NVidia card. Since I am interested in performing parallelism in small devices, I am having the PBPi collect the data and delegate processing to a remote kernel. This solution has worked fine for me.

The second computer uses Mathematica version 9.01 with an NVIDia Geoforce 630 . It is a weak card, but does the job.

The processing power of the microcontroller is not to the level of image processing. I am assuming this is what you are looking to accomplish. Therefore, consider remote kernel parallelism allowing the RBPi tackles only hardware control and data collection.

I hope my suggestion might work good to you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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