GPotion: An embedded DSL for GPU programming in Elixir

  • Andre Rauber Du Bois UFPel
  • Gerson Cavalheiro UFPel

Abstract


This paper presents GPotion, a DSL for GPU programming embedded in the Elixir functional language. GPotion allows programmers to write low-level GPU kernels, similar to CUDA kernels, in Elixir but also provides high-level facilities like, garbage collection, type inference and simplified data transfer. Preliminary experiments demonstrate that GPotion allows fast and efficient kernels with little overhead in comparison to pure CUDA. GPotion is implemented using metaprogramming features of Elixir, without having to modify Elixir’s compiler. The source code for GPotion and the benchmarks used in the experiments are available in a GitHub repository1.
Keywords: Elixir, actors model, gpu, parallel programming
Published
2023-09-25
DU BOIS, Andre Rauber; CAVALHEIRO, Gerson. GPotion: An embedded DSL for GPU programming in Elixir. In: BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES (SBLP), 27. , 2023, Campo Grande/MS. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2023 . p. 1–8.