AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


YAGAL: Yet Another GPGPU Abstraction Library

Authors

;

Term

4. term

Education

Publication year

2018

Submitted on

Pages

97

Abstract

Dette speciale dokumenterer udviklingen af YAGAL, et C++-baseret abstraheringsbibliotek til generel GPU-programmering (GPGPU). Udgangspunktet er, at GPGPU kræver et nyt programmeringsparadigme og at eksisterende løsninger ofte binder udviklere til særlige kompilere eller OpenCL. YAGAL søger at tilbyde højere abstraktion uden at låse kompilervalg ved at bruge CUDA Driver API til enhedsstyring og LLVM til at generere PTX-kode ved kørsel. Biblioteket undersøger en handlingsabstraktion, hvor kædning af funktionskald på vektorobjekter konstruerer og udfører GPU-kerner. Arbejdet omfatter designprincipper, API- og arkitekturdesign, implementering (bl.a. hukommelsesstyring, PTX-eksekvering og generering af LLVM IR) samt demonstrationsprogrammer. YAGAL sammenlignes med state-of-the-art rammeværk via generelle kriterier, statiske målinger og en anvendelighedsvurdering baseret på Cognitive Dimensions of Notations. Vi reflekterer over teknologi- og designvalg og konkluderer, at et GPGPU-rammeværk kan udvikles med den valgte konfiguration, men at der findes andre muligheder, som er lige så performante og udtryksfulde med simplere udvikling. Projektet prioriterer høj abstraktion frem for maksimal ydeevne og sigter ikke mod at overgå CUDA/OpenCL.

This thesis reports the development of YAGAL, a C++ GPGPU abstraction library. The starting point is that GPGPU programming imposes a new programming model and existing solutions often tie developers to custom compilers or OpenCL. YAGAL aims to provide higher-level abstraction without constraining compiler choice by using the CUDA Driver API for device management and LLVM to generate PTX code at run time. The library explores an action abstraction where chaining function calls on vector objects constructs and executes kernels on the GPU. The work covers design principles, API and architecture design, implementation (including device memory management, PTX execution, and LLVM IR generation), and demo applications. YAGAL is compared to state-of-the-art frameworks using general criteria, static measurements, and a usability evaluation based on the Cognitive Dimensions of Notations. We reflect on technology and design choices and conclude that building a GPGPU framework with this configuration is feasible, but that other options exist that offer comparable performance and expressiveness with simpler development. The project prioritizes abstraction over peak performance and does not aim to outperform CUDA/OpenCL.

[This summary has been generated with the help of AI directly from the project (PDF)]