GraalPy – A high-performance embeddable Python 3 runtime for Java
11–20 of 151 posts
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#12Earlier quoted context omitted.
Python implementations naturally don't have any GIL in regards to JVM or CLR variants, there is no such thing on those platforms. YAML and JSON have both tried to replicate the XML tooling experience, only worse. Schemas, comments, parsing and schema conversions tools.
I think GraalPython does have a GIL, see https://github.com/oracle/graalpython/blob/master/docs/contr... - and if by "there is no such thing on those platforms" you mean JVM/CLR not having a GIL, C also does not have a GIL but CPython does.
CPython built with --disable-gil does not have a GIL (as long as PYTHONGIL=0 and all loaded C extensions are built for --disable-gil mode) https://peps.python.org/pep-0703/#py-mod-gil-slot
"Intent to approve PEP 703: making the GIL optional" (2023) https://news.ycombinator.com/item?id=36913328#36917709 https://news.ycombinator.com/item?id=36913328#36921625
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#13I guess what makes Python interesting right now is the integration with ML toolchains, CUDA, Metal/MLX, pytorch, tensorflow, LLM encoders/decoders, etc. more than Python the language. But can GraalVM run those codes meaningfully when Python is merely used for glue code with the important bits implemented in native code?
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#14Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#15I guess what makes Python interesting right now is the integration with ML toolchains, CUDA, Metal/MLX, pytorch, tensorflow, LLM encoders/decoders, etc. more than Python the language. But can GraalVM run those codes meaningfully when Python is merely used for glue code with the important bits implemented in native code?
https://www.graalvm.org/dev/reference-manual/python/Native-E...
> CPython provides a native extensions API for writing Python extensions in C/C++. GraalPy provides experimental support for this API, which allows many packages like NumPy and PyTorch to work well for many use cases. The support extends only to the API, not the binary interface (ABI), so extensions built for CPython are not binary compatible with GraalPy. Packages that use the native API must be built and installed with GraalPy, and the prebuilt wheels for CPython from pypi.org cannot be used. For best results, it is crucial that you only use the pip command that comes preinstalled in GraalPy virtualenvs to install packages. The version of pip shipped with GraalPy applies additional patches to packages upon installation to fix known compatibility issues and it is preconfigured to use an additional repository from graalvm.org where we publish a selection of prebuilt wheels for GraalPy. Please do not update pip or use alternative tools such as uv.
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#16Earlier quoted context omitted.
I think GraalPython does have a GIL, see https://github.com/oracle/graalpython/blob/master/docs/contr... - and if by "there is no such thing on those platforms" you mean JVM/CLR not having a GIL, C also does not have a GIL but CPython does.
"PEP 703 – Making the Global Interpreter Lock Optional in CPython" (2023) https://peps.python.org/pep-0703/ CPython built with --disable-gil does not have a GIL (as long as PYTHONGIL=0 and all loaded C extensions are built for --disable-gil mode) https://peps.python.org/pep-0703/#py-mod-gil-slot "Intent to approve PEP 703: making the GIL optional" (2023) https://news.ycombinator.com/item?id=36913328#36917709 https://…
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#17HPy can eventually be used to support CPython extension modules in GraalPy
Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#18Re: GraalPy – A high-performance embeddable Python 3 runtime for Java
#19Does it have to be run in a GraalVM, or any JVM implementation is fine?