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.
Strange personally never heard or read about Accelerate before. I think it has the same main problem with generic naming language like Futhark (this very issue already mentioned in a different concurrent post).
As a modern array language, perhaps Accelerate should look into D4M as a basis, it's also started 10+ years ago [1].
D4M is based on math like SQL, specifically associative array algebra but not relational unlike SQL. It's more generic since can it caters to most modern data abstractions including spreadsheets, database tables, matrices, and graphs [2].
You can achieve 100M database inserts per second with D4M and Accumulo more than a decade ago back in 2014 [3].
[1] D4M: Dynamic Distributed Dimensional Data Model:
[2] Mathematics of Big Data: Spreadsheets, Databases, Matrices, and Graphs:
https://direct.mit.edu/books/monograph/5691/Mathematics-of-B...
[3] Achieving 100M database inserts per second using Apache Accumulo and D4M (2017 - 46 comments):
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."
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.