/GPGPU-with-GLES

Performing GPGPU computations on BeagleBone Black using OpenGL ES

Primary LanguageCGNU General Public License v3.0GPL-3.0

EKLAVYA - GPGPU with GLES

BeagleBone Black

TABLE OF CONTENTS

AIM OF THE PROJECT

Working on a library for performing GPGPU (General Purpose GPU) computations on BeagleBone Black using OpenGLES

Clone and build the Repository

Clone the repository:

git clone https://github.com/Pratham-Bot/GPGPU-with-GLES.git

Create the build folder and enter it:

mkdir GPGPU-with-GLES/cmake-build && cd GPGPU-with-GLES/cmake-build

Run the cmake command:

cmake ..

If running on your host, you need to specify the location of EGL and OpenGL ES libraries:

cmake .. -DEGL_INCLUDE_DIR=/usr/include/ -DGLES2_INCLUDE_DIR=/usr/include

Building the repository

make

Sharing internet connection from linux to BeagleBone Black

Internet connection can be established as shown here

FILE STRUCTURE

📦Eklavya--GPGPU with GLES
┣ 📂benchmark                        #contain benchmarking applications to compare performance bbetween CPU and GPU
┣ 📂cmake                            #contains open2..cmake and config file
┣ 📂exmaples                         #contains .c code for computations
┃ ┗ 📂array_add_fixed16              #contains array addition .c file  
┃ ┗ 📂array_add_float                #contains array addition .c file
┃ ┗ 📂array_x4                       #contains array multilication code by 4
┃ ┗ 📂array_x9                       #contains array multilication code by 9
┃ ┗ 📂chain_conv2d_float             #contains 2D convolution example
┃ ┗ 📂chain_simple_float             #contains 2D convolution example
┃ ┗ 📂fir_conv_float
┃ ┗ 📂mult_mat_int                   #conatin logic for mmatrix multiplication
┃ ┗ 📂testing                        #conatins tetsing file for benchmarking
┣ 📂include                          #launch files
┣ 📂shaders                          #contains .fs code to be performed on GPU
┣ 📂src                              #contains source files
  ┗ 📂include
┣ 📜.gitignore
┣ 📜CMakeLists.txt
┣ 📜LICENSE
┗ 📜README.md

Programming Languages used

  • C
  • GLSL

Libraries Used

  • GLES 2.0

  • GLFW- Graphics Library Framework (GLFW) allows users to create and manage OpenGL windows, while handling keyboard, mouse and joystick inputs. GLFW and FreeGLUT are alternatives to the same functions.

  • GLUT- The OpenGL Utility Toolkit Library provides high level utilities to simplify OpenGL programming, especially in interacting with the Operating System. GLUT is designed for simple to moderately complex programs focused on OpenGL rendering.

  • EGL- EGL (Embedded System Graphics Library) is the interface between OpenGL ES and the underlying native display platform.

  • GLEW- GLEW (OpenGL Extension Wrangler Library) is a cross-platform C/C++ extension loading library that provides an effcient mechanism to determine which extensions are supported on the platform.

  • GLAD- GLAD allows the user to include only those extensions which they wish to, leading to faster compile times. GLEW can detect which dependencies are available at compile time, leading to better adaptability.

RESULT

  • Triangle using GLUT library Screenshot from 2022-10-03 00-13-17

  • Rectangle using GLUT library Screenshot from 2022-10-03 00-13-23

  • Matrix Multiplication Screenshot from 2022-10-03 02-41-15

  • Transpose of a matrix

Screenshot from 2022-10-14 13-29-36

  • Addition of a matrix with its own transpoe Screenshot from 2022-10-03 02-39-08

  • Multiplication of Array using Scalar

Screenshot from 2022-10-08 23-28-33

Screenshot from 2022-10-08 23-32-14

Contributors

REFERENCES AND ACKNOWLEDGMENT

  • SRA VJTI Eklavya 2022.
  • Referred This to understand OpenGL functions.
  • Referred This to understand matrix multiplication code base.
  • This website helped us to get the conceptual knowledge of OpenGL.
  • Offical Website of OpenGL.
  • PowerSDK Installations guide
  • Special Thanks to our mentors Krishna Narayanan and Kunal Agarwal for guiding us throughout the Eklavya Journey.

License

MIT License