3 ms·
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
by PartiallyTyped 6y ago
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.
- rand_r 6y agoUnfortunately 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.
- PartiallyTyped 6y agoAh right, yes I remember. Perhaps .vmap from pytorch?