4 ms·
PyPy Vectorization
- hencq 11y agoFrom this reddit thread [1]: > Right now this work is on a branch and will likely be merged to the default branch after the PyPy 2.6.1 release which should happen any day now. So this work should become available in PyPy 2.7.0 or PyPy 15.xx if the release names change naming conventions. What's especially cool is that any JIT generated by PyPy will be able to use this, so if you write your own language in RPython it will be able to automatically use SIMD as well. [1] https://www.reddit.com/r/Python/comments/3ihhpf/pypy_vectorization_the_end_of_summer_pypy_simd/ https://www.reddit.com/r/Python/comments/3ihhpf/pypy_vectori...
- fijal 11y agoThat's how it works () - you still need to make sure in your interpreter that your traces are optimizable by the SIMD optimizer, which is usually relatively fragile, that's just a feature of the optimizations at hand, GCC/clang also have this problem
- krastanov 11y agoI thought that NumPy is already supposed to use "BLAS and company" internally and that BLAS is already as optimized as possible. What am I missing or misunderstanding?
- Veedrac 11y agoI'm not sure what the BLAS story in PyPy is, but manual looping over elements is not going to work like that, and SIMD will help significantly there. If you're only doing broadcasted operations, there's not much draw in PyPy over CPython.
- SixSigma 11y agoThat you don't need Numpy or even python. This is about the Vm JIT using simd if it can
- srean 11y agoEven when you use BLAS calls there are some inefficiencies that remain. There can be (i) no optimization across BLAS calls, sometimes these can help a lot (ii) the loops or code containing the BLAS call can benefit significantly from this
- brrt 11y agoReally cool work. The upshot of it is that SIMD optimizations can work within traced numpy calls. This is preferable to calling out to an optimized subroutine, because the first lets you keep your registers intact (and your trace) and the last does not. I wonder what issues prevent them from tracing the happy-case list yet.
- wyldfire 11y agoKeep up the good work. Looking forward to this in a future pypy release.