logoalt Hacker News

Athasyesterday at 4:30 PM1 replyview on HN

One big difference compared to NumPy (which you may or may not care about depending on how picky you are), is that Accelerate is a higher-order programming model. Basically, you can have 'map' (with a user-provided function), and it will go fast, in contrast to NumPy's model where only first-order operations go fast.


Replies

mccoybyesterday at 4:49 PM

Can you say a bit more about this?

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.

show 1 reply