Re:A 1000-processor chip powered by an AA battery (2016)
by PartiallyTyped on Monday February 15, 2021 @06:29AM
(#26141708)
In python, with numpy, you can use `np.vectorize`, there exists a jax equivalent that can enable accelerators to do your parallel stuff. Cuda exists, but it isn't as simple as `parallel-for`. For trivial for-loops, you can use OMP.
[ Parent
| on HN ]
Re:A 1000-processor chip powered by an AA battery (2016)
by rand_r on Monday February 15, 2021 @07:00AM
(#26141915)
Unfortunately np.vectorize doesn’t do anything smart.
From the docs:
The vectorize function is provided primarily for convenience, not for performance. The implementation is essentially a for loop.
Re:A 1000-processor chip powered by an AA battery (2016)
by PartiallyTyped on Monday February 15, 2021 @07:23AM
(#26142052)
Ah right, yes I remember. Perhaps .vmap from pytorch?