Description

Extending the LLVM Compiler Infrastructure with a Vulkan compatible SPIR-V backend. A incomplete SPIR-V Backend for OpenCL is already available and in development on which we will build upon. Further down the line this should make it possible to write OpenGL and Vulkan shaders in C++. In theory every frontend language supported by llvm could be used. The ultimate goal is to make it possible to have CPU and GPU code in the same cpp source file. This would have many benefits, for instance it would make it possible to call the same functions from the CPU and GPU side. Also the DirectX compiler, which is transitioning to LLVM, will benefit from this. For the successful completion of the PR/BA/DA it is not needed to fulfill all of these goals. All this can be done in teams, and I will support you as best as I can.
https://github.com/KhronosGroup/LLVM-SPIRV-Backend

Tasks

Get familiar with the codebase. Then write test cases in combination with reference solutions in llvm/test/CodeGen/SPIRV/vulkan, for which the code in llvm/lib/Target/SPIRV should then be adjusted to make the tests succeed.

Problems we will encounter down the line (especially interesting for BA/DA):

  • How to handle opaque pointers
  • Transforming unstructured control flow to structured control flow
  • ...

Requirements

  • Knowledge of the English language
  • Not scared of large codebases
  • Interested in contributing to an established and large open source project
  • Knowledge of C, C++, OpenGL or Vulkan
  • Interest for Compilers, the LLVM IR and SPIR-V
  • Being familiar with Git, Github, Issues, Pull requests, Test-driven development, etc.
  • Not everything listed here is required but keep in mind, the less you know, the more you need to learn.

Environment

The project should be implemented within the LLVM codebase. This means, test-driven development and high quality code is essential.

Responsible

For more information please contact Lukas Lipp.

Details

Type

Bachelor Thesis
Student Project
Master Thesis

Persons

over 9000