Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi
by SeanDav on Sunday December 27, 2015 @03:01PM
(#10798560)
Disclaimer: I know nothing about the issues, but would using C with inline assembly gain anything?
Re:Py-Videocore: Python Library for GPGPU on Raspberry Pi
by belleandsebasti on Sunday December 27, 2015 @05:05PM
(#10798926)
No. Inline assembly is a static construct targeting the same compute unit as the C code during compile-time.
What is needed is "runtime inline assembly" which assembles inline assembly for a different target architecture at runtime.
This is essentially what shader programs are and you don't need special syntax to support it. Just store your shader program in a char* and bundle an assembler/compiler with your host program.
The VideoCore's own processor, commonly referred to as the VPU or just the VC4, is a perfectly normal architecture with its own vector unit and DSP addons. C can compile into that perfectly easily, and the real-time OS that runs on it alongside Linux is written in it, but there aren't any adequate open source C compilers yet.
More info on the QPU here:
https://github.com/hermanhermitage/videocoreiv-qpu