1 year ago
#215732
Přemysl Šťastný
Is it possible to program GPU in pure Haskell?
I wonder, whether I can write code, which ought to be evaluated by GPU, in pure Haskell.
For example, a function for multiplication of two large matrices in GPU have (theoretically) no side effects, therefore it might be possible to call it from pure Haskell function.
But I am also worried, whether something don't get broken, if I just wrap CUDA C++ procedures to Haskell via FFI as pure functions. As I understand from the documentation, I must be sure, that there are no side effects and I am not sure at all.
So my questions are:
- Is there something, what might break, if I wrap C++ CUDA function to Haskell as a pure function?
- Is there some library, which enables me to use just pure Haskell to program GPU without usage of Haskell FFI?
- If not, is it theoretically possible to make one?
Thanks.
haskell
gpu
hardware-acceleration
haskell-ffi
0 Answers
Your Answer