A Vulkan Backend for Accelerate

Publication date

DOI

Document Type

Master Thesis

Collections

Open Access logo

License

CC-BY-NC-ND

Abstract

With the continuous advancement of parallel hardware, and the growing demand for cross-platform high-performance computing, Vulkan, as an open standard and cross-platform, low-overhead, low-level library for 3D graphics and computing, has emerged noticeably. The vast majority of scientific software, however, only supports executing programs on NVIDIA graphics processing units (GPUs) due to various reasons. Accelerate, a domain-specific language (DSL) for high-performance array computation in the functional programming language -- Haskell, is one example that traditionally relies on CUDA for GPU acceleration. This thesis presents the development of a Vulkan backend for Accelerate, enabling general-purpose GPU computing on a broader range of hardware. The main contribution includes the design and implementation of a code generator for the OpenGL shading language (GLSL), which is a language for building the Vulkan computing kernel. The code generator supports most primitive scalar operations in Accelerate. Additionally, a runtime for the Vulkan backend was developed. Experimental results demonstrate that the Vulkan backend offers competitive performance compared to the CUDA backend, proving its viability as an alternative. However, Vulkan extension support across various platforms poses the biggest limitation of our work, restricting the ability to run programs on certain devices. Beyond technical contributions, this thesis also provides comprehensive introductions to the components of Accelerate and the features of Vulkan. We hope to provide extensive learning material for those interested in the Vulkan compute pipeline and possibly developing a Vulkan backend for similar DSLs.

Keywords

GPGPU; Vulkan; Accelerate; Array Programming; Functional Programming

Citation