GPotion: An embedded DSL for GPU programming in Elixir
André Rauber Du Bois, Gerson Geraldo H. Cavalheiro · 2023
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.