## GPGPU on the R-PI.

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

### Re: GPGPU on the R-PI.

But we already know that the Videocore supports OpenVG and
OpenGL ES ... I don't think they mention OpenCL for the
Videocore.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

ghans wrote:But we already know that the Videocore supports OpenVG and
OpenGL ES ... I don't think they mention OpenCL for the
Videocore.

ghans
There is no OpenCL for the Videocore.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

techs1200
Posts: 28
Joined: Thu Jan 24, 2013 7:45 pm

### Re: GPGPU on the R-PI.

Earlier in the thread there were economic arguments being used as to why there is no OpenCL support.

...But now they have sold close to a million rpi's...

I really wish there was CL support

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

techs1200 wrote:Earlier in the thread there were economic arguments being used as to why there is no OpenCL support.

...But now they have sold close to a million rpi's...

I really wish there was CL support
There figures also explain why having *already* sold a million means little to the cost of implementing OpenCL.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

techs1200
Posts: 28
Joined: Thu Jan 24, 2013 7:45 pm

### Re: GPGPU on the R-PI.

jamesh wrote:
techs1200 wrote:Earlier in the thread there were economic arguments being used as to why there is no OpenCL support.

...But now they have sold close to a million rpi's...

I really wish there was CL support
There figures also explain why having *already* sold a million means little to the cost of implementing OpenCL.
Hey I'm not gonna argue with you about this, this subforum is about feedback and requests. You've got my feedback and request, have a nice day.

merlz42
Posts: 25
Joined: Sun May 13, 2012 1:19 pm

### Re: GPGPU on the R-PI.

jamesh wrote:
techs1200 wrote:Earlier in the thread there were economic arguments being used as to why there is no OpenCL support.

...But now they have sold close to a million rpi's...

I really wish there was CL support
There figures also explain why having *already* sold a million means little to the cost of implementing OpenCL.
I have 1 pi. I would buy at least 3 more right now if it had openCL support. If enough people feel this way, could it happen?

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

### Re: GPGPU on the R-PI.

Who is gonna take a commmercial risk and start a kickstarter ?
Nobody.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

merlz42 wrote:
jamesh wrote:
techs1200 wrote:Earlier in the thread there were economic arguments being used as to why there is no OpenCL support.

...But now they have sold close to a million rpi's...

I really wish there was CL support
There figures also explain why having *already* sold a million means little to the cost of implementing OpenCL.
I have 1 pi. I would buy at least 3 more right now if it had openCL support. If enough people feel this way, could it happen?
So, we have $10...just another$199990 to go....

Let's guess that the profit margin to the chip supplier $3 (seriously, it's a guess). Lets say$200k needed to implement OpenCL (no idea how much it would really cost, probably much more than that as it's a multi engineer effort), Brcm need to sell 66k more chips. Not beyond the realms of possibility. But the vast majority of people who have bought Pi's have no need of OpenCL, so lets say 5% would want it. That's 50k people out of the million already sold. Starting to look a bit dodgy now.

It's a numbers game.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

### Re: GPGPU on the R-PI.

Could they charge for OpenCL or does the license preclude that.

If they cannot charge then it does not matter how many Pi's they have already sold. The cost justification would have to be on how many new Pi's OpenCL would attract. Whilst I would buy a Pi if it had OpenCL and not buy one otherwise, I doubt people like me add up to much of a Market.

I guess if they could use any development in other future products there might be some mileage, Broadcom are supposed to be interested in OpenCL in general after all..

Personally I would like to see them give it to a University to do as a project.
i.e. with the appropriate non disclosures in place,

jdobmeier
Posts: 19
Joined: Sat Dec 10, 2011 4:49 pm

### Re: GPGPU on the R-PI.

Since when did this thread's name change from "GPGPU on the pi" to "Boo-hoo if I can't have openCL screw you guys I'm going home" ? Here is a reality check: having programmed nontrivial tasks in OpenCL let me assure you that it is in no way a panacea which will rid data parallel algorithm implementation of all (or even most) difficult aspects. The raison-d'etre for OpenCL is lessening (which is not to say eliminating) the amount of work required to port an application between rival architectures, period! Its performance compared to architecture specific methods (GLSL, CUDA, Brook+, PTX, CAL, etc.) is horrid and IMO, for that reason alone (even neglecting the patently obvious lack of economic viability), OpenCL just doesn't make sense for this application. And anyway, GLSL is a legitimate strategy for developing an understanding of how any graphics processing unit works at a basic level. Such a strategy can only contribute to the production of more efficient code. Certainly a more realistic strategy than parroting the outrageous marketing hype that OpenCL kernels are nothing more than regular old familiar C.

If people want to offer pertinent complaints, I am a perfectly worthy target. The fact is that, in an above post, I shamelessly lied that I had implemented the legacy GLSL tutorial 0. For my statement to have been creditable I would have had to provide for reading the data back from the GPU to the CPU.

Perhaps if I had been honest up front this thread would not have devolved into such a sad state of affairs, for that I take complete responsibility and offer my sincere apologies to anyone seriously following this topic.

\end{rant}

Jservheen
Posts: 9
Joined: Sun Dec 16, 2012 3:25 pm

### Re: GPGPU on the R-PI.

Say Khronos (the developer of openCL) were to sign an NDA with Broadcom that let them use the GPU specs and release another binary that supported an openCL API?

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

### Re: GPGPU on the R-PI.

Jservheen wrote:Say Khronos (the developer of openCL) were to sign an NDA with Broadcom that let them use the GPU specs and release another binary that supported an openCL API?
Khronos aren't the "developer" of anything but the API. They are, to quote the blub on the Khronos group home page,
The Khronos Group is a not for profit industry consortium creating open standards for the authoring and acceleration of parallel computing, graphics, dynamic media, computer vision and sensor processing on a wide variety of platforms and devices.
Anyone can implement those APIs (that's what the "Open" bit is all about). Again, from the Khronos site...
If you are a software developer, you are free to use Khronos APIs to program software tools, applications and middleware with no restrictions of any kind.
...
If you or your company is developing a product that implements a Khronos API then you must pass conformance tests defined by Khronos before you can use the name or logo of the API in association with your product or call your product ‘compliant’ or ‘conformant’ with a Khronos specification. This is to ensure that Khronos APIs are consistently implemented by multiple vendors to create a reliable platform for developers.
Yes, if you want to implement something that advertises itself as "OpenCL", you have to pay, but there's nothing to stop anyone (with the right knowledge, obviously) implementing the API /without/ calling it OpenCL.

Gecko King
Posts: 7
Joined: Sun Dec 29, 2013 7:29 am

### Re: GPGPU on the R-PI.

http://www.raspberrypi.org/phpBB3/posti ... =63&t=3330

i thinks the raspberry pi will suport it (CUDA) in a moment!

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

Gecko King wrote:http://www.raspberrypi.org/phpBB3/posti ... =63&t=3330

i thinks the raspberry pi will suport it (CUDA) in a moment!
That link doesn't seem to be correct....
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

Gecko King
Posts: 7
Joined: Sun Dec 29, 2013 7:29 am

### Re: GPGPU on the R-PI.

Im sory here is the corretc link

www.zillians.com/running-cuda-on-raspberry-pi/

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

Having read their website I am still don;t understand what they are doing. It's bizarrly lacking in details. Are they translating CUDA ops to OpenGLES shaders? Without access to the GPU instructions set and associated data this would seem to be the only option.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Posts: 6392
Joined: Fri Jul 29, 2011 5:36 pm

### Re: GPGPU on the R-PI.

At the top of the page it says that all the CUDA stuff is done remotely rather than on the pi.

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

In which case - I really don't understand the point.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Posts: 6392
Joined: Fri Jul 29, 2011 5:36 pm

### Re: GPGPU on the R-PI.

I guess it's to say "We can run CUDA on the Raspberry Pi*! *Not really though."

(That's not to say I don't think it's worth doing, I am sure it will be useful to many people.)

hellonearthis
Posts: 22
Joined: Sun Aug 05, 2012 6:35 pm

### Re: GPGPU on the R-PI.

What would it cost for Broadcom to open source all this stuff they have locked down.
Could we get a Kickstarter to fund the opening of this documentation?
It would be nice to make the Pi a truly open source open hardware project,
so the hacker community can push the bare metal.

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

### Re: GPGPU on the R-PI.

Isn't the recently released QPU documentation enough for
you ???

Then join the reverse engineering geeks (which already have
are...

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

hellonearthis wrote:What would it cost for Broadcom to open source all this stuff they have locked down.
Could we get a Kickstarter to fund the opening of this documentation?
It would be nice to make the Pi a truly open source open hardware project,
so the hacker community can push the bare metal.
Kickstarter wouldn't raise enough...got to be in the high $100k's if not millions. It's not just documentation either - what about compilers, linkers etc? But that said, almost everything you need has already been opened - the QPU's for example were opened up in the 3D release, the vector units is pretty much completely reverse engineered already. Check out the baremetal forum and the outstanding work done by Herman Hermitage. The baremetal is already being pushed. A lot. Principal Software Engineer at Raspberry Pi Ltd. Working in the Applications Team. marcoalexcampos Posts: 37 Joined: Fri Jun 22, 2012 2:45 pm ### Re: GPGPU on the R-PI. There figures also explain why having *already* sold a million means little to the cost of implementing OpenCL. I guess the only entity that can *force* Broadcom to do something is their customer, RaspberryPi Foundation. On our side all we can do is push RaspberryPi Foundation to choose a supplier that supports OpenCL for RaspberryPi v2, leaving those that don't want to support it out of the race. I personally believe that Broadcom is getting far more than the price they charge for the chip, from the RaspberryPi project. They're getting publicity/awareness, people spending man/hours exploring and getting knowledge about their chip/architecture, etc, etc. Personally I would pay an extra 5-10$ for a licence to use OpenCL if the performance would be significant for some bits of code. but please don't be a SONY that opened half their cores on PS3... it's all or nothing, since we need a company that is committed with the developer/hacking community!

Best regards,
Marco.
Last edited by marcoalexcampos on Wed Jun 11, 2014 2:25 pm, edited 1 time in total.

jamesh
Raspberry Pi Engineer & Forum Moderator
Posts: 31838
Joined: Sat Jul 30, 2011 7:41 pm

### Re: GPGPU on the R-PI.

marcoalexcampos wrote:
There figures also explain why having *already* sold a million means little to the cost of implementing OpenCL.
I guess the only entity that can *force* Broadcom to do something is their customer, RaspberryPi Foundation.

On our side all we can do is push RaspberryPi Foundation to choose a supplier that supports OpenCL for RaspberryPi v2, leaving those that don't want to support it out of the race. I personally believe that Broadcom is getting far more than the price they charge for the chip, from the RaspberryPi project. They're getting publicity/awareness, people spending man/hours exploring and getting knowledge about their chip/architecture, etc, etc.

Personally I would play an extra 5-10$for a licence to use OpenCL if the performance would be significant for some bits of code. but please don't be a SONY that opened half their cores on PS3... it's all or nothing, since we need a company that is committed with the developer/hacking community! Best regards, Marco. You should be aware that the team that developed the VC4 is up for sale, along with the rest of the business unit that it is part of. I don't think approaching either the Foundation or Broadcom about this minor use case is going to fall on happy ears at the moment. (See news on Broadcom selling mobile platform unit) I also don't see the Foundation changing chip in the near future. AFAIK there are few if any chips that would get anywhere near to being a suitable replacement. The Foundation has spend$100k's on optimisations targeted at the Videocore - a different chip (i.e. different manufacturer) throws all that money away. Just to get OpenCL? I don't think so.

So, your best options is : Do your own OpenCL implementation. All the documentation is available - the Quad processors specs are released, and Herman Hermitage has pretty much fully documented the VPU. That's all you need. People are already writing compilers that target them both.

Also worth noting - the Foundation is committed to EDUCATION (as per their charity aims), not the developer/hacker community, although clearly they do help developers and hackers wherever they can.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

marcoalexcampos
Posts: 37
Joined: Fri Jun 22, 2012 2:45 pm

### Re: GPGPU on the R-PI.

Hi Jamesh,

Thank you for your reply. I'm sorry to say, but I believe that you're not quite right on the following statement:
Also worth noting - the Foundation is committed to EDUCATION (as per their charity aims), not the developer/hacker community, although clearly they do help developers and hackers wherever they can.
a) It's the developers/hackers that supported the foundation up until now, and not the other way around (dough it is healthy that both support each-other). The success of the RaspberryPi project is mainly result of the number of RPi sold, the publicity around all those exotic projects it was used for, the books and articles written by those hackers/developers, etc. Yes, the education idea is _very_ good, and I'm backing it up all the way, trying to implement projects in elementary schools in my area, but it was the hack/developer community that made it come this far, and have the financial resources to implement those school projects you refer.

b) "EDUCATION" is not something restricted to elementary school's. What the hacking/developer community does _is_ education! It fuels the soul of the youngsters with the desire to hack/explore the hardware and software on the RPi.

I'm 42 years old, and I'm from the generation that ZX81 and Spectrum (and Videopac) inspired me to go to computers, but if it wasn't for the games I never had one to start with, and didn't discovered (at least at that age) the world of computer programming (oh the time we used all those "poke"'s and "peek"'s commands ), understand?

I wish all the best to this project.

Best regards,
Marco.