Skip to content

Commit 7169449

Browse files
committed
more info and pictures
1 parent 59d1486 commit 7169449

File tree

4 files changed

+50
-6
lines changed

4 files changed

+50
-6
lines changed

README.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ To run Jython scripts, you will need a GraalPy distribution running on the JVM s
116116
117117
</details>
118118
119-
## Current Status
120-
121-
![](docs/mcd.svg)
122-
![](docs/performance.svg)
123-
124119
## Aims and Benefits of GraalPy
125120
126121
* **Convenient, low-overhead integration with Java and other languages.**
@@ -138,12 +133,37 @@ To run Jython scripts, you will need a GraalPy distribution running on the JVM s
138133
139134
GraalPy can usually execute pure Python code faster than CPython.
140135
We see a geomean speedup of 4 on the [Python Performance Benchmark Suite](https://pyperformance.readthedocs.io/) over CPython.
136+
141137
142138
* **Support C extensions**
143139
144140
GraalPy supports most of the public [CPython C API](https://docs.python.org/3/c-api/index.html) as well as the [HPy API](https://hpyproject.org/).
145141
It supports many native libraries including PyTorch, Tensorflow, SciPy, as well many other data science and machine learning libraries from the rich Python ecosystem.
146142
Performance when C extensions are involved is close to CPython, but can vary a lot depending on the specific interactions of C extension code and Python code.
143+
144+
## Current Status
145+
146+
Compatibility and performance is very good for many use cases, especially in the data science and machine learning space.
147+
For example, models from [Hugging Face](https://huggingface.co/) like Stable Diffusion or GPT that use [PyTorch](https://pytorch.org/) usually just work.
148+
149+
<figure>
150+
151+
![](docs/mcd.svg)
152+
<figcaption>
153+
154+
To check out if packages you use work, we have created a [Python Compatibility Checker](https://www.graalvm.org/python/compatibility/).
155+
</figcaption>
156+
</figure>
157+
158+
<figure>
159+
160+
![](docs/performance.svg)
161+
<figcaption>
162+
163+
Benchmarks run via `pip install pyperformance && pyperformance run` on each of CPython, Jython, and GraalPy.
164+
Installation was done via [Pyenv](https://github.com/pyenv/pyenv).
165+
Geomean was calculated on pair-wise intersection of benchmarks that run on CPython & Jython or CPython & GraalPy.
166+
</figcaption> </figure>
147167
148168
## Python on the JVM
149169
@@ -154,13 +174,34 @@ Python objects support the same [interoperability protocol](docs/user/Interopera
154174
There are also [many options](docs/user/PythonNativeimages.md) to tweak GraalPy for GraalVM Native Images to reduce footprint.
155175
When embedded into Java, GraalPy also emulates many of the Python [OS interfaces](docs/user/OsInterface.md#java-backend) with standard Java APIs, so embedders have full control over standard streams, file system, or socket access.
156176
177+
<figure>
178+
179+
![](docs/jbang.png)
180+
<figcaption><small>
181+
182+
[Java embedding](https://github.com/timfel/graalpy-jbang) using [JBang](https://www.jbang.dev/)
183+
</small>
184+
</figcaption>
185+
</figure>
186+
157187
## Migration from CPython
158188
159189
GraalPy should in many cases work as a drop-in replacement for CPython.
160190
You can use `pip` to install packages as usual.
161191
However, packages with C code usually do not provide binaries for GraalPy, so they will be automatically compiled during installation.
162192
This means that build tools have to be available and installation may take longer.
163193
We provide [Github actions](scripts/wheelbuilder) to help you build binary packages with the correct dependencies.
194+
Thanks to our integration with GraalVM Native Image, we can deploy Python applications as [standalone binary](docs/user/PythonStandaloneBinaries.md), all dependencies included.
195+
196+
<figure>
197+
198+
![](docs/standalone.png)
199+
<figcaption><small>
200+
201+
[Standalone Python app binary](https://github.com/timfel/racing-all-afternoon) based on work by [Joey Navarro](https://github.com/josephnavarro/racing-all-afternoon)
202+
</small>
203+
</figcaption>
204+
</figure>
164205
165206
## Migration from Jython
166207
@@ -171,6 +212,9 @@ We describe the current status of the compatibility mode [here](docs/user/Jython
171212
172213
## Documentation
173214
215+
![](docs/reference.webp)
216+
217+
We have [Quick Reference Sheet](https://www.graalvm.org/uploads/quick-references/GraalPy_v1/quick-reference-graalpy-v1(eu_a4).pdf) to help you get started quickly.
174218
More user documentation is available in [docs/user](docs/user).
175219
176220
## Contact
@@ -190,5 +234,5 @@ Please consult the [security guide](./SECURITY.md) for our responsible security
190234
191235
## License
192236
193-
This GraalVM implementation of Python is Copyright (c) 2017, 2023 Oracle and/or its affiliates and is made available to you under the terms the Universal Permissive License v 1.0 as shown at [https://oss.oracle.com/licenses/upl/](https://oss.oracle.com/licenses/upl/).
237+
This GraalVM implementation of Python is Copyright (c) 2017, 2024 Oracle and/or its affiliates and is made available to you under the terms the Universal Permissive License v 1.0 as shown at [https://oss.oracle.com/licenses/upl/](https://oss.oracle.com/licenses/upl/).
194238
This implementation is in part derived from and contains additional code from 3rd parties, the copyrights and licensing of which is detailed in the [LICENSE](./LICENSE.txt) and [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE.txt) files.

docs/jbang.png

127 KB
Loading

docs/reference.webp

220 KB
Binary file not shown.

docs/standalone.png

155 KB
Loading

0 commit comments

Comments
 (0)