Difference between revisions of "BeagleBoard/GSoC/2021ProposalGPGPU"

From eLinux.org
Jump to: navigation, search
(Description)
(About your project)
Line 76: Line 76:
 
| Jun 07 || Pre-work setup OpenGL ES drivers for beagleboard, Coding officially begins!
 
| Jun 07 || Pre-work setup OpenGL ES drivers for beagleboard, Coding officially begins!
 
|-
 
|-
| Jun 17 || researching GPGPU on beagleboard, Introductory YouTube video
+
| Jun 17 || validate OpenGL calls, add two vectors together, Introductory YouTube video
 
|-
 
|-
| June 24 || create matrix multiplication sample program
+
| June 24 || setup elinux page for the GPGPU tutorial
 
|-
 
|-
| June 30 || create convolution sample program (separable and non-separable convolution)
+
| June 30 || create matrix multiplication sample program
 
|-
 
|-
| July 12 18:00 UTC || setup OpenCL drivers, Mentors and students can begin submitting Phase 1 evaluations
+
| July 12 18:00 UTC || create convolution sample program (separable and non-separable convolution), Mentors and students can begin submitting Phase 1 evaluations
 
|-
 
|-
 
| July 16 18:00 UTC || Phase 1 Evaluation deadline
 
| July 16 18:00 UTC || Phase 1 Evaluation deadline
Line 88: Line 88:
 
| July 23 || measure timings between CPU / GPU
 
| July 23 || measure timings between CPU / GPU
 
|-
 
|-
| July 30 || create tutorial on elinux how to do to GPGPU (is this a good place?)  
+
| July 30 || finish tutorial on elinux how to do to GPGPU (is this a good place?)  
 
|-
 
|-
| Aug 06 || add one more sample if time allows (vector reduction, compute histogram...)
+
| Aug 06 || clean up code, add one more sample if time allows (vector reduction, compute histogram...)
 
|-
 
|-
 
| August 10 || finish everything, Completion YouTube video
 
| August 10 || finish everything, Completion YouTube video

Revision as of 13:39, 8 April 2021


ProposalTemplate


About Student: Steven Schuerstedt
Mentors: Hunyue Yau
Code: current sample code: https://github.com/StevenSchuerstedt/GPGPU_with_OpenGL
Wiki: https://elinux.org/BeagleBoard/GSoC/2021ProposalGPGPU
GSoC: https://elinux.org/BeagleBoard/GSoC/Ideas-2021#GPGPU_with_GLES

Status

This project is currently just a proposal.

Proposal

I have completet the requirements on the ideas page. ARM cross compiling pull request: https://github.com/jadonk/gsoc-application/pull/153

About you

IRC: steven100
Github: https://github.com/StevenSchuerstedt
School: Karlsruhe Institute of Technology
Country: Germany
Primary language: German, English
Typical work hours:5AM - 3PM US Eastern
Previous GSoC participation: I love the idea of open source and especially open hardware. First time participant.

About your project

Project name: GPGPU with OpenGL ES

Description

The beagleboard ARM A8 Processor has an integrated graphics accelerator from PowerVR (SGX530 or 550). As the name implies this chip is mainly used and built for graphics rendering, but as the time shows there exist alot of other applications that profit from the parallel nature of graphic chips, like deep learning, bitcoin mining or analyzing DNA sequences. This is called GPGPU (general purpose computations on graphic processing units) and is done with api's like OpenCL or CUDA. The PowerVR SGX only supports the OpenGL ES 2.0 specification (there also exist a propiertary openCL driver from IT https://university.imgtec.com/fun-with-beagle-video/), this api is heavily targeted towards graphics rendering, but can also be exploited for general purpose computations. The goal of this project is, to show how to use the mostly unused graphics accelerator chip for general purpose computations using the OpenGL ES api. Therefore I will create samples, showing how to use the GPGPU and also show the timing difference when doing computations on CPU vs GPU. The samples could be convolution or matrix multiplication. The samples and techniques shown, are applicable for all beagleboards, but maybe most relevant for BBAI, as it has the best gpu.


- ARM neon intrinsics

- BBAI (SGX 544)

- upstream? what happens after GSoC

- vector addition example (=> sum reduction?)

Implementation: I provide a first example how to add two vectors using OpenGL (https://github.com/StevenSchuerstedt/GPGPU_with_OpenGL). I will use this as a starting point for this project. OpenGL ES 2.0 is only a small subset of the whole OpenGL specification, so the specific OpenGL commands have to be choosen carefully, so they are supported on the SGX GPU. Data transfer between CPU and GPU will be done using textures. The difficulty for each GPGPU project is to find a good mapping from the input data to textures and texture coordinates. Also there exists different texture formats, with different floating point precisions. The fragment shader will include the actual computations for the data and the result will be written to a output texture attached to a framebuffer. - set up drivers for BB

- GPGPU needs to be done with Vertex / Fragment shader in OpenGL ES

- perform checks if needed openGL calls are actually available

- send data to GPU with textures / uniforms / vertex arrays

- set correct texture type, how to access specific element

- do computation on framebuffers (only off screen rendering)

- read back results with glReadPixel

Timeline

Provide a development timeline with a milestone each of the 11 weeks and any pre-work. (A realistic timeline is critical to our selection process.)

Mar 29 Applications open, Students register with GSoC, work on proposal with mentors
Apr 13 Proposal complete, Submitted to https://summerofcode.withgoogle.com
May 17 Proposal accepted or rejected
Jun 07 Pre-work setup OpenGL ES drivers for beagleboard, Coding officially begins!
Jun 17 validate OpenGL calls, add two vectors together, Introductory YouTube video
June 24 setup elinux page for the GPGPU tutorial
June 30 create matrix multiplication sample program
July 12 18:00 UTC create convolution sample program (separable and non-separable convolution), Mentors and students can begin submitting Phase 1 evaluations
July 16 18:00 UTC Phase 1 Evaluation deadline
July 23 measure timings between CPU / GPU
July 30 finish tutorial on elinux how to do to GPGPU (is this a good place?)
Aug 06 clean up code, add one more sample if time allows (vector reduction, compute histogram...)
August 10 finish everything, Completion YouTube video
August 16 - 26 18:00 UTC Final week: Students submit their final work product and their final mentor evaluation
August 23 - 30 18:00 UTC Mentors submit final student evaluations

Experience and approach

I have a decent experience in programming, computer-graphics and mathematics. I developed a 2D platformer game with C++ and OpenGL (StevieJump), a Monte-Carlo Pathtracer with C++ (StevieTrace) and I'm very interested in computer architecture and embedded systems. I followed Ben Eaters excellent youtube series to build a 8-Bit Breadboard Computer (8-Bit). I currently work as a C++ / OpenGL software developer at my university. I have experience in OpenCL and did several GPGPU courses at my university.

Contingency

I got stuck many times in my life, especially with programming related tasks. Programming and computer science can sometimes be a very unforgiving and frustrating experience. There is no easy way around this, so I will just keep trying and do my best, there is no shame in failure, just in giving up. So if I dont give up I will eventually succed. If I really get stuck I just take a break and do some outdoor exercise, this always helps.

Benefit

Enable more people to use the GPU on a beagleboard. Accelerate computations. Free up the main processor to do other stuff. If successfully completed, what will its impact be on the BeagleBoard.org community? Include quotes from BeagleBoard.org community members who can be found on http://beagleboard.org/discuss and http://bbb.io/gsocchat.

Misc

Please complete the requirements listed on the ideas page. Provide link to pull request.

Suggestions

Is there anything else we should have asked you?