Is it possible to use the computational power of the GPU in Elixir

I did not do this in any language, but I know that some projects use GPU for certain algorithms. Is it possible in Elixir?

3 Likes

There’s this presentation about interfacing with CUDA from Erlang. For an example of how to set up a CNode that you can talk to in order to execute stuff there’s this repository showing how to do it in Elixir.

4 Likes

Excellent, thank you very much!

1 Like

Via a port is what I’d do, and personally I’d use OpenCL so it actually works on more hardware (can even fallback to the CPU if no GPU is available for it if you want).

1 Like

This is not Elixir-specific and I don’t have experience with it, but there’s an entire section in the book “Seven Concurrency Models in Seven Weeks” on GPU programming in general.

3 Likes

I’ve also heard this link is very good to learn about GPU programming: http://courses.cms.caltech.edu/cs179/

3 Likes