LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
11–20 of 54 posts
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#12Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#13Earlier quoted context omitted.
This has some additional info from the author: http://crna.cc/
I get that it's a compiler backend for the GPU of the Raspi, but what does that mean? I mean, can you compile arbitrary C code to run on the GPU? Is this for making a GPU firmware? Divers? games? Bitcoin miners?
Although the VideoCore in the Pi is particularly interesting because it's responsible for the early stages of the Pi's boot process (the ARM cores are actually turned off when you initially apply power). Right now, that's all a big Broadcom-proprietary binary chunk; good compilers would be the first step towards freeing that code.
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#14What can you do with this?
Not publishing any of the firmware work yet since it can't boot ARM yet (but SDRAM init reliably works across all boards). Once I get ARM working to some extent, I'll probably clean the code up and publish it too.
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#15You can run C code on GPUs? I don't know anything about GPUs, but I thought they had a completely different programming model that requires different programming languages and paradigms.
Yup. Check out the VideoCore ISA: http://www.broadcom.com/docs/support/videocore/VideoCoreIV-A... Note that in this case, the author is writing the bootloader firmware so performance isn't a major concern, though.
https://github.com/hermanhermitage/videocoreiv
The VPU is basically a general purpose RISC processor with some fancy vector instructions on top. In fact, most of the firmware that runs on it is written in C.
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#16You can run C code on GPUs? I don't know anything about GPUs, but I thought they had a completely different programming model that requires different programming languages and paradigms.
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#17It bugs me that LLVM targets are not properly 'plug in'. LLVM backends can be in a plugin, but you have to tell the frontend which target to use (so it can use the correct data-layout etc). Its the frontends that don't support plug-in targets. Clang, for example, hardcodes the supported targets. A combination of using enums as a 'target triple' and lack of dynamic target registration conspire against easy-to-use out-…
Have you considered this is a deliberate decision, with a goal of having most targets in-tree? :)
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#18Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#19What can you do with this?
To elaborate, I made this to develop an open source VPU side bootloader for Raspberry Pi because I was unhappy with the state of other C compilers targeting VC4 (I explained why in my blog). I haven't had the time to work on my firmware recently due to IRL events so I decided to publish the compiler. Not publishing any of the firmware work yet since it can't boot ARM yet (but SDRAM init reliably works across all boar…
Re: LLVM Backend for the VideoCore4, Raspberry Pi 2 VPU
#20Earlier quoted context omitted.
Yup. Check out the VideoCore ISA: http://www.broadcom.com/docs/support/videocore/VideoCoreIV-A... Note that in this case, the author is writing the bootloader firmware so performance isn't a major concern, though.
This isn't the same, the document in question relates to the QPU ISA. The VPU ISA hasn't been officially documented but there were many projects that involved reverse engineering it. The VC4 ISA is documented here: https://github.com/hermanhermitage/videocoreiv The VPU is basically a general purpose RISC processor with some fancy vector instructions on top. In fact, most of the firmware that runs on it is written in…