PyPy support
See original GitHub issueIt would be interesting to combine JAX with PyPy, given we have jit
to amortize the overhead of crossing the Python/C boundary.
I was able to successfully compile JAX against PyPy and CPyExt, but the result did not work due to an error in the swig bindings.
My gut feeling here: we should replace SWIG with a different binding framework. SWIG is pretty painful with or without PyPy. The obvious choices are pybind11
, which TensorFlow may also move to (TBD), or something like cffi
or cppyy
which the PyPy authors recommend.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (7 by maintainers)
Top Results From Across the Web
PyPy
Compatibility: PyPy is highly compatible with existing python code. It supports cffi, cppyy, and can run popular python libraries like twisted, and django....
Read more >PyPy support - PyO3 user guide
Using PyPy is supported via cpyext. Support is only provided for building Rust extension for code running under PyPy. This means that PyPy...
Read more >PyPy - Wikipedia
PyPy does not have full compatibility with more recent versions of the CPython ecosystem. While it claims compatibility with Python 2.7, 3.7, 3.8...
Read more >The PyPy plugin — uWSGI 2.0 documentation - Read the Docs
A new PyPy plugin based on cffi is available since uWSGI 1.9.11. The old slow cpyext-based one has been removed from the tree....
Read more >PyPy Is Faster than Python, but at What Cost?
The reason for this is that most machine learning libraries use C API that is not supported by PyPy. Some people have requested...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It also may mean you don’t have scipy installed.
I get the same error. I think this is due to
jaxlib
being a CPython extension (which PyPy could not load for some reason).