4 ms·
I used Futhark in the past. It's probably been 5 years or more, so a lot may have changed since then. It's absolutely a much lower barrier to entry, especially
by sspiff 3y ago
I used Futhark in the past. It's probably been 5 years or more, so a lot may have changed since then.
It's absolutely a much lower barrier to entry, especially if you are familiar with functional programming. However, it also leaves a lot of performance on the table, and I found it to be hard or cumbersome to integrate with languages other than Python at the time.
And you're still stuck with CUDA (which is single vendor) or OpenCL (which is a pain to set up on most consumer systems, and has very lackluster driver quality for a lot of vendors). I would have liked that by now support for Vulkan compute or OpenGL compute shaders would have been added, but alas.
- Munksgaard 3y agoGreat to hear that you liked the language! Regarding the performance, I'd be interested to hear more about your experiences. Because we compile to CUDA or OpenCL in the end, we cannot claim to be faster than what you could (in principle) write in hand. However, most of our benchmarks compare favorably with handwritten reference implementations, and the heavily optimizing compiler is able to write code that is tough to write by hand. However, we're always looking for instances where we can do better. The goal is to be comparable to CUDA/OpenCL in as many cases as possible.
- sspiff 3y agoI'd love to tell you what it did suboptimally in my usecase at the time, but I no longer have the code and it's been so long I don't remember the specifics. Like I said in my earlier comment, it was so long ago the performance remarks may be outdated and the project may have resolved them. I would like to give Futhark another try, but I need easy and portable integration in either Go or Rust, and as far as I can tell, that's not the case today? For my current project, I ended up selecting webgpu for my GPU compute needs.
- fulafel 3y agoGo and Rust should be able to call Futhark via C, no? Link: https://futhark-book.readthedocs.io/en/latest/interoperability.html#calling-futhark-from-c https://futhark-book.readthedocs.io/en/latest/interoperabili...
- Ambix 3y agoIs it possible to write llama.cpp in Futhark? Like do effective math manipulations on 4-bit vectors within GPU?