Imagination Technology (the creators of the SGX530 GPU that comes with the BeagleBone/PocketBeagle which power Bela) have just released an OpenCL driver for the GPU. We looked at this a few months back while they were working on it and my conclusion was that, considering the CPU time and latency involved in transferring data to/from the GPU and the relatively modest processing power it provides, there is not that much benefit to be had from using this for low-latency audio processing.
This implementation can see the CPU load reduced from 55% to 20% by using OpenCL as long as the application can trade off latency.
, which is true. However, in order to achieve these figures, you will require at least the following:
- that the task is parallelisable
- that you write it in optimized OpenCL
- that you wait.
Off the top of my head the 55% CPU load reduction came with a latency of over 100ms 36ms and the task itself was a short convolution
So there goes my hope of using this for long convolution reverb tails ... I think the only case where this could be of potential use to Bela users is for pre-processing data being logged to disk or sent to the Scope or GUI ... but in all of these cases, you are probably better off doing it at the destination (MATLAB/Python, or the browser). For these reason, I have not spent time trying it out in person or adding support for this to the Bela image. If any Bela user feels that they may gain something from using this in their Bela projects, they could start by playing around with it on the latest beagleboard image and then share their feedback and if the interest gets concrete, we can look into providing some support for it on the Bela image.
The registration process on their site is a bit tedious (you need to "request access" to the materials and write what you will be using them for). Besides this specific topic, Imagination's "University" site has plenty of interesting resources on embedded graphics and RISC-V, in case you enjoy that sort of things.
Below is the official announcement as I received it via email.
EDIT: checked the docs and amended the post
Fun with Beagle: Exploring the GPU
The BeagleBoneBlack ™ has been a popular development platform for Students, Hobbyists, and Developers for many years. It has sold millions of units.
As its popularity grew, it became a favourite Linux Single Board Computer for industrial developers.
The TI (Texas Instruments) ”Sitara™ system-on-chip at the heart of Beagle contains an Imagination SGX530 GPU. Until now, this has been just a block on the system diagram and was a “black box” to most Beagle users.
In recognition of Beagle’s popularity, we are lifting the lid on its GPU…
There’s now a complete course on the basics of graphics, which can run on multiple platforms including the Beagle Bone Black
[Introduction to Mobile Graphics, 2020 Edition] illustrates how graphics are created and manipulated and then animated across the screen in the most power-efficient way
And now we are releasing an Open CL driver which runs on the SGX530 allowing parallel compute activities to be run on the GPU.
The package includes the Open CL driver along with a detailed and practical explanation about getting it running and how it can be used.
The example demonstrated is Audio Sample Rate Conversion, running on the GPU – a first for the Beagle Board!
The materials were written by Dr. Iain Hunter, who was at TI when the Sitara SoCs first appeared. Since then he has become a leading independent developer on this platform
In a very practical way, he takes you through this interesting and quite complex part of the Beagle Bone Black system and enables you to implement Open CL on the GPU and run an application.
Language: Available now in English!
- Chinese (Simplified & Traditional to follow in March)
The complete learning materials package can be downloaded free of charge from the Imagination University Programme website, [https://university.imgtec.com]
- You’ll need to register, confirm your e-mail, login and request the download [https://university.imgtec.com/fun-with-beagle-gpu/]
In addition, there are a series of videos illustrating the set-up and use of Open CL on SGX530.
- You can take a look [https://university.imgtec.com/fun-with-beagle-video/]
And for support, there’s a Forum for questions [https://university.imgtec.com/forums/fun-with-beagle/]
We wish you lots of “Fun with Beagle” and welcome your feedback!