It can vectorize, parallelize on the CPU, or offload to the GPU automatically.
It's a very mature project, maybe 10+ years old.
In particular, compare you JAX’s vmap — one model for vmap is that it is a program transformation on first order functions, that returns a first order function (“function” is a bit wonky here: but it’s JAX’s Jaxpr representation), but vmap itself is not a primitive in the Jaxpr language.
Is the same true here about map (can I think of it like vmap)? Or is it true that I can define higher order functions and Accelerate will handle them? What about functions with recursion?
Thanks! If you happen to see this - Futhark is very cool.
I'm not a Jax expert. Accelerate's 'map' allows for almost arbitrary sequential code - there is some fine print, because it's an embedded language, and the biggest fine print is that nested parallelism is not allowed. You can define your own Haskell-level higher order functions, and Accelerate will handle them just fine, because essentially all the Haskell-level computation is "compiled away" (by being run) before the Accelerate code is JIT-compiled at run-time. You can consider Haskell to be a meta-language in which you ultimately construct Accelerate program terms, and then those are compiled and run - not too dissimilar from how Jax does it, actually.
Recursion works, but for an uninteresting reason: the recursion is on the Haskell side, and will essentially be unrolled before Accelerate gets its hand on it. This allows you to do some fun things (like partially evaluating a ray tracer on its scene description), but it's often not what you want, and Accelerate provides some combinators (that look like higher-order Haskell functions) for expressing sequential looping.
Jokes aside, types should help a lot.
also, accelerate was first published to Hackage in 2009 though so it isn't an especially new thing.
I'd go so far as to say that any submission with a title that is less three words should get automatically binned, and posts to software projects should be required to explain in the title what the software is/does.
Is it just me or is this post also clearly vote-manipulated? Either that or a lot of NumPy people are hanging around on HN early on a Saturday morning.
/s
Overlaps in naming happen, especially when we all want to choose simple and catchy words like "Accelerate."