lightweight wrapper around basic LLVM functionality
Project description
A Lightweight LLVM Python Binding for Writing JIT Compilers
llvmlite is a project originally tailored for Numba’s needs, using the following approach:
A small C wrapper around the parts of the LLVM C++ API we need that are not already exposed by the LLVM C API.
A ctypes Python wrapper around the C API.
A pure Python implementation of the subset of the LLVM IR builder that we need for Numba.
Why llvmlite
The old llvmpy binding exposes a lot of LLVM APIs but the mapping of C++-style memory management to Python is error prone. Numba and many JIT compilers do not need a full LLVM API. Only the IR builder, optimizer, and JIT compiler APIs are necessary.
Key Benefits
The IR builder is pure Python code and decoupled from LLVM’s frequently-changing C++ APIs.
Materializing a LLVM module calls LLVM’s IR parser which provides better error messages than step-by-step IR building through the C++ API (no more segfaults or process aborts).
Most of llvmlite uses the LLVM C API which is small but very stable (low maintenance when changing LLVM version).
The binding is not a Python C-extension, but a plain DLL accessed using ctypes (no need to wrestle with Python’s compiler requirements and C++ 11 compatibility).
The Python binding layer has sane memory management.
llvmlite is quite faster than llvmpy’s thanks to a much simpler architeture (the Numba test suite is twice faster than it was).
llvmpy Compatibility Layer
The llvmlite.llvmpy namespace provides a minimal llvmpy compatibility layer.
Compatibility
llvmlite works with Python 3.7 and greater.
As of version 0.37.0, llvmlite requires LLVM 11.x.x on all architectures
Historical compatibility table:
llvmlite versions |
compatible LLVM versions |
---|---|
0.37.0 - … |
11.x.x |
0.34.0 - 0.36.0 |
10.0.x (9.0.x for aarch64 only) |
0.33.0 |
9.0.x |
0.29.0 - 0.32.0 |
7.0.x, 7.1.x, 8.0.x |
0.27.0 - 0.28.0 |
7.0.x |
0.23.0 - 0.26.0 |
6.0.x |
0.21.0 - 0.22.0 |
5.0.x |
0.17.0 - 0.20.0 |
4.0.x |
0.16.0 - 0.17.0 |
3.9.x |
0.13.0 - 0.15.0 |
3.8.x |
0.9.0 - 0.12.1 |
3.7.x |
0.6.0 - 0.8.0 |
3.6.x |
0.1.0 - 0.5.1 |
3.5.x |
Documentation
You’ll find the documentation at http://llvmlite.pydata.org
Pre-built binaries
We recommend you use the binaries provided by the Numba team for the Conda package manager. You can find them in Numba’s anaconda.org channel. For example:
$ conda install --channel=numba llvmlite
(or, simply, the official llvmlite package provided in the Anaconda distribution)
Other build methods
If you don’t want to use our pre-built packages, you can compile and install llvmlite yourself. The documentation will teach you how: http://llvmlite.pydata.org/en/latest/install/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for llvmlite-0.38.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f11feda33f2b49abf5acc11828eebb3098050bbf6cd1cd75e2b05eb7676cb1 |
|
MD5 | fe8f05ea944e2c23b1f7573fe2632e1e |
|
BLAKE2b-256 | 8d3278a5240559a002d9f775e0a96c9b515a95e721c55f3d49033349f7082c06 |
Hashes for llvmlite-0.38.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17140e1462aa7f9250428fff7dd24187ea30498034a832bdb7385cbdc28fd4bf |
|
MD5 | 36ffbae458500173a6dfc76a5ad7a765 |
|
BLAKE2b-256 | 90513234afa1eda15a99fd497db3fb1b0dfa708788f4ea71a6f5e7da11c042b1 |
Hashes for llvmlite-0.38.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87805405ccdd1add51f51d85997fbff01c920adf4da600dbe197e1f3eebd1e57 |
|
MD5 | 2a895f597331755e555abdca4f1ce650 |
|
BLAKE2b-256 | 5f29b0979c2f9d1cf87690ece9f752587f7de7cb0d9f6d853c34c818c2f3aa98 |
Hashes for llvmlite-0.38.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b88cc3c6c0010df8a720c777ef1c0879d304404e0727c4ac9e3dc98d5815e10 |
|
MD5 | 6e6ac808aaddce73cb951a92bce6895c |
|
BLAKE2b-256 | 4c145e362488949d04f2f911032c93b9dcbccbfdbdec972e6029a7ba3abfc211 |
Hashes for llvmlite-0.38.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b040d392e998582883cd680e81afb4cd2d331d69cb93d605c735bfd2caa09805 |
|
MD5 | 03257bee67a51f79d9282979c638af03 |
|
BLAKE2b-256 | 8a57e2819636275589629ba9d4e2409892af120639fbb0c2831a9cdc7a62c207 |
Hashes for llvmlite-0.38.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0497a19428083a0544663732a925994d74e3b15c3c94946c6e7b6bf21a391264 |
|
MD5 | 645e597c010292aead8b344e54835afd |
|
BLAKE2b-256 | ff57495e5a39e253e54887bf529d7f2a8f96482e2d810a9e5f78e2bc02e1bc29 |
Hashes for llvmlite-0.38.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70734d46c2611f3fe765985fe356aaec393dc79bbd735f7f4d23f910b5148dc3 |
|
MD5 | 89f30edf57e48394752b9f943a721d2a |
|
BLAKE2b-256 | 8e0ae4fa7d25a51959d0ce1584f1a2e7e1d85c0367456ac816ffe36e026c742d |
Hashes for llvmlite-0.38.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de321a680690d1ce040f34294d215ed0ac5fdcf7c98f044d11ac9b9d9ebc969f |
|
MD5 | 21e5dedff83b8107fa995014bb139c35 |
|
BLAKE2b-256 | ed82b5f4ef216f8fd24f5f6b271e0c9f5ac37a815b769bddbe7c9d4a1f711266 |
Hashes for llvmlite-0.38.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f7b2838898c80557e959f83fb28d260e5e2301396f34830f3ec6811ae53f6be |
|
MD5 | 10d19c5b3c69e7ad2774a60f7160a508 |
|
BLAKE2b-256 | 0ace5ceabed00a13b8517ff1fa29b0f5f67638ed18566323721b4e4ed444c5dd |
Hashes for llvmlite-0.38.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c967b96d708556597e003217fd99f0c20e73d09c91d6d5054c538becc396ba79 |
|
MD5 | 936e6a48a11337b0e5a2bae64f485d62 |
|
BLAKE2b-256 | ea19c66fcc77ea3f95d1a382c056077a17d5fa6563153c04723efed7f9258c7b |
Hashes for llvmlite-0.38.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fb7cb2907814dd03a152549d1c4dfee4854881d9cc7da85414b77903a681aa6 |
|
MD5 | bd4cf775bb6ec826377e15496a4ecc55 |
|
BLAKE2b-256 | 4f75d26fafbe4078e810a40c7b646a7a4380823cce7f779de25a6a55d30dd163 |
Hashes for llvmlite-0.38.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f43861f382b954fbf2ff88db5f13b00ac11ec4353445d3ba80e1eadcdd06c149 |
|
MD5 | 061a4259eab432d71a0cec3b68f1c6e7 |
|
BLAKE2b-256 | 0f3805dcc16ecf2207fe35fb0728ea5291926ca16feef4872cd94e661a6a1e1c |
Hashes for llvmlite-0.38.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b66bf3624dd0b3739b4cf1b3cc3735dbe7799bc90d2a7a79a54b0ce37e1a38 |
|
MD5 | ddfb619cf910304c6e8f185a42de00e2 |
|
BLAKE2b-256 | 61e2b5456dccae17ad25f3ec54253314ed7fb2b4ea1fa6433cfb6038d4d2757a |
Hashes for llvmlite-0.38.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e07bacc2bb2ef1bf33dbf64d4bd13330baeae2287902100b144e43bcd1b066b |
|
MD5 | 57679b13763e487313f72b7ba8b646cb |
|
BLAKE2b-256 | e198265323b2b00c1cb70ebe8c3ff99d0ba480125b6ce4aa86cb387a48513b51 |
Hashes for llvmlite-0.38.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48558fddce5ff351f9de98beff35888aa351598e5635b3b91d67ec9e10d458cc |
|
MD5 | 1ef313e305c93bba6b13029aad9ad3d1 |
|
BLAKE2b-256 | b9c1eac52f28dd98f9894ee10a9cb559113ac2639dbecfb4405e63d243ddd587 |
Hashes for llvmlite-0.38.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63e178c6f7872a39572e210cb266fb6db6386f5e622e2d8c79491b6d8c7aa942 |
|
MD5 | f121e4e6e4392d1feabbb35a3b8cc0d5 |
|
BLAKE2b-256 | aa4cb6e6d0ccea526ccf5e44a25e9546fe097b05127f2a15c0dc3858652bbe4b |
Hashes for llvmlite-0.38.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 081d9c36d8e012b86bac02af49e225d883975ab5978ba33c3cc291474620c84d |
|
MD5 | df746b721570d7e3cc204d0fff584aa8 |
|
BLAKE2b-256 | e29779649b40a9cf1458b30f22c4ca9ebe619f2dac78913c000ac4609288ba0b |
Hashes for llvmlite-0.38.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1095557a27b041f1217036e568a5449d4b385c2415cb4316b2f5476f96e9a58 |
|
MD5 | d934e6426b4b10fac2a22116b7bf1a20 |
|
BLAKE2b-256 | ce2f7ff65593633a365d43caca22b01d325aa88bc0abee841b83fad468b50274 |
Hashes for llvmlite-0.38.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b48c8fffc3512a2e97c6f70deb09eb49c419af66ced79e317cc2323117dcec6 |
|
MD5 | c4c8c1dcf4f6d3d5e2bab45b4b09e358 |
|
BLAKE2b-256 | 05a6389333f07ae43c70de50bf36e3bff9888bc71fac825bb16b7764162e1010 |
Hashes for llvmlite-0.38.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2426bfff67fdab577c7d5321c252d880434911caa6f9152f5be98da71b30e084 |
|
MD5 | e75e5157247bddec050d72e962cf591e |
|
BLAKE2b-256 | d2f88c2289f266baa5e710564c72e47f7e059ec9244d73944154daadc610278a |
Hashes for llvmlite-0.38.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a91e25488609cc91db91de206e023b7fe0889ac007adb31c713e685384497ba |
|
MD5 | 5b81e09847734d42ddf5a0c2916cdd8f |
|
BLAKE2b-256 | 35adf0e5ea2096befce8213e5bc4cef1bb8e98f83c6b727d6e3de966a9b55da0 |
Hashes for llvmlite-0.38.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5845432b4660c530d27c46434b9669290f205d9b1c1e02e52f43f6d11782b4be |
|
MD5 | eaba220c14045db3ca0aefdfa0007560 |
|
BLAKE2b-256 | dc03e062c5c7cb55822baefdae5af8cb52b0e530bc518af22075d1c0f621360f |
Hashes for llvmlite-0.38.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e8bbb8e97d7cc0b6d124ba9f8577955fdc7639715f925c410abe02d2bc92862 |
|
MD5 | 58170e8a17e4897a5c70ff0f8f1256bb |
|
BLAKE2b-256 | c87fd8e3c72c301da78db36518ae8968460c8758de427928510ac74fbc912e00 |
Hashes for llvmlite-0.38.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7a438917c30e87ac79bb89c773c100560dc346e0f0b03aabd88a6f6de3556c6 |
|
MD5 | 45d5d663bd9544a67c1c92a7d9e0519d |
|
BLAKE2b-256 | f7852891c5dcb258974b191a18420100f10bda48f8eb23382934592b916d0468 |