You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-6Lines changed: 50 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,11 +116,6 @@ To run Jython scripts, you will need a GraalPy distribution running on the JVM s
116
116
117
117
</details>
118
118
119
-
## Current Status
120
-
121
-

122
-

123
-
124
119
## Aims and Benefits of GraalPy
125
120
126
121
* **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
138
133
139
134
GraalPy can usually execute pure Python code faster than CPython.
140
135
We see a geomean speedup of 4 on the [Python Performance Benchmark Suite](https://pyperformance.readthedocs.io/) over CPython.
136
+
141
137
142
138
* **Support C extensions**
143
139
144
140
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/).
145
141
It supports many native libraries including PyTorch, Tensorflow, SciPy, as well many other data science and machine learning libraries from the rich Python ecosystem.
146
142
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
+

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
+

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>
147
167
148
168
## Python on the JVM
149
169
@@ -154,13 +174,34 @@ Python objects support the same [interoperability protocol](docs/user/Interopera
154
174
There are also [many options](docs/user/PythonNativeimages.md) to tweak GraalPy for GraalVM Native Images to reduce footprint.
155
175
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.
156
176
177
+
<figure>
178
+
179
+

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
+
157
187
## Migration from CPython
158
188
159
189
GraalPy should in many cases work as a drop-in replacement for CPython.
160
190
You can use `pip` to install packages as usual.
161
191
However, packages with C code usually do not provide binaries for GraalPy, so they will be automatically compiled during installation.
162
192
This means that build tools have to be available and installation may take longer.
163
193
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
+

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>
164
205
165
206
## Migration from Jython
166
207
@@ -171,6 +212,9 @@ We describe the current status of the compatibility mode [here](docs/user/Jython
171
212
172
213
## Documentation
173
214
215
+

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.
174
218
More user documentation is available in [docs/user](docs/user).
175
219
176
220
## Contact
@@ -190,5 +234,5 @@ Please consult the [security guide](./SECURITY.md) for our responsible security
190
234
191
235
## License
192
236
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/).
194
238
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.
0 commit comments