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.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab070266f0f51304789a6c20d4be91a9e69683ad9bd4861eb89980e8eb613b3a |
|
MD5 | 76b250afa720f07df22bb5934c3f5e2e |
|
BLAKE2b-256 | 5d3afb78a0e0c9612ea0d3df0a049c4610206c1d692f6e7eda2c7cbcc6154d23 |
Hashes for llvmlite-0.38.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c64c90a8b0b7b7e1ed1912ba82c1a3f43cf25affbe06aa3c56c84050edee8ac |
|
MD5 | 0f1bde8898a58bd691d968aba2a3657f |
|
BLAKE2b-256 | 2cd342c6bd6e4f3320e3d4d24de38115737752dffe2d65ec73461fda1d414e12 |
Hashes for llvmlite-0.38.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c0adce1793d66d009c554809f27baeb6258bf13f6fbaa12eff7443500caec25 |
|
MD5 | d587a63009f1e6ff64a5d39f1fa7c75c |
|
BLAKE2b-256 | 901fe6a7c0f290d9888748d7719e50f24764d7be60ac1df090a4e39da73b7154 |
Hashes for llvmlite-0.38.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98da8436dbc29013ea301f1fdb0d596ab53bf0ab65c976d96d00bb6faa0b479 |
|
MD5 | f27622322ad391ab08743d8efef5de38 |
|
BLAKE2b-256 | 203879085c29b3f4c275644078516a9f7e45f0848a065ea566e639aa33370ca6 |
Hashes for llvmlite-0.38.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 633c9026eb43b9903cc4ffbc1c7d5293b2e3ad95d06fa9eab0f6ce6ff6ea15b3 |
|
MD5 | 43b46be0cd9e9efdedd82ad5d0477881 |
|
BLAKE2b-256 | b43b070ff0a6f629b00024497fe8a34baa3bb0abb0e74fe29b27e5d082479893 |
Hashes for llvmlite-0.38.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a5e0ed215a576f0f872f47a70b8cb49864e0aefc8586aff5ce83e3bff47bc23 |
|
MD5 | a1eb9fcea465e5f4ac0c3f04eb518990 |
|
BLAKE2b-256 | a0c7cf305b9c67043a03be568965f135f3ef067a4019f8536ce8d259f89dd5d9 |
Hashes for llvmlite-0.38.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7dd2bd1d6406e7789273e3f8a304ed5d9adcfaa5768052fca7dc233a857be98 |
|
MD5 | c63655b71f660a60b3d677d1fe3049b4 |
|
BLAKE2b-256 | eb80e2bcf7acb9753d446580fe199f8e440bc2d93df985be3f2652d3863b0d51 |
Hashes for llvmlite-0.38.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66462d768c30d5f648ca3361d657b434efa8b09f6cf04d6b6eae66e62e993644 |
|
MD5 | 9d9b223210b21ae1f3f04e8605948aef |
|
BLAKE2b-256 | acf4d397244a05176a26009a307941c23f7af6f5e4f491b73eb94d87081c90a2 |
Hashes for llvmlite-0.38.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d76c0fa42390bef56979ed213fbf0150c3fef36f5ea68d3d780d5d725da8c01 |
|
MD5 | 79ec87169fa3d3c290d6cabb2b0689b7 |
|
BLAKE2b-256 | 903398cde46cd883f870c93f105234aa21ceeadb529778ab27147a4290a57c10 |
Hashes for llvmlite-0.38.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8fac4edbadefa4dddf5dc6cca76bc2ae81df211dcd16a6638d60cc41249e56 |
|
MD5 | 9b344c37a612b522aac7bb7ba0e2aec8 |
|
BLAKE2b-256 | 2f9d141a4aacb37c5ca7f822180c5a703a2a90fcef6c498752a430886bd22dfa |
Hashes for llvmlite-0.38.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f53c3448410cc84d0e1af84dbc0d60ad32779853d40bcc8b1ee3c67ebbe94b1 |
|
MD5 | 5f9a8bf2951bf929a1bcab443def6a26 |
|
BLAKE2b-256 | 2833a1f0258667a3f3836382dcfe21b2d0dd99a5168a5001841a4c351a7fa2fa |
Hashes for llvmlite-0.38.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e609f7312a439b53b6f622d99180c3ff6a3e1e4ceca4d18aca1c5b46f4e3664 |
|
MD5 | 44b97c144fce8842c6aea407a0f0f6f2 |
|
BLAKE2b-256 | 42b4f436ceff2ac38e071132e50905ba2fb57a6a3026cee5e5fdfcd5dad713de |
Hashes for llvmlite-0.38.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edfa2c761cfa56cf76e783290d82e117f829bb691d8d90aa375505204888abac |
|
MD5 | 0e22b4057e78a46bf86160fb3318c3af |
|
BLAKE2b-256 | bd336b3d7a9177d3ecc43e856f33ef83c634379ded0827f0268e384ce5cf3a5b |
Hashes for llvmlite-0.38.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e11bd9929dcbd55d5eb5cd7b08bf71b0097ea48cc192b69d102a90dd6e9816f |
|
MD5 | 48e8354c92f260ba904d36e36ff53478 |
|
BLAKE2b-256 | 4c0ce73dd807f9bdf7da050785cef4b0521a4c69f97bda1ebdcd7f54b9641c03 |
Hashes for llvmlite-0.38.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c07d63df4578f31b39b764d3b4291f70157af7f42e171a8884ae7aaf989d1f7 |
|
MD5 | baddcbb998b57dd581bc440beb139842 |
|
BLAKE2b-256 | 0fabd8f91851d0c7680c14630ea8a51f42d3d87449e78e529958fe2752d996c3 |
Hashes for llvmlite-0.38.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41e638a71c85a9a4a33f279c4cd812bc2f84122505b1f6ab8984ec7debb8548b |
|
MD5 | a21d7c094938a0ee61d842dcb42ccd3e |
|
BLAKE2b-256 | 337d13be5ffca6d6a26e3f0f19bd3d1a3215833c722d021579c222b809d6ba7f |
Hashes for llvmlite-0.38.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f95f455697c44d7c04ef95fdfce04629f48df08a832d0a0d9eb2363186dbb969 |
|
MD5 | 592ffa81188bbcd811775c4d75c8dd40 |
|
BLAKE2b-256 | 36936e1026f0640d413805064a2bd48fb4a1c103fafb545936efb2d1a604e68d |
Hashes for llvmlite-0.38.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c4f26c6c370e134a909ac555a671fa1376e74c69af0208f25c0979472577a9d |
|
MD5 | 765c45fce467885e6a2827ecff29e015 |
|
BLAKE2b-256 | d3c0434bc661f866644ed322c81764d71da94fd662c8d321c3b480984b7efa2b |
Hashes for llvmlite-0.38.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbfbe546394c39db39a6898a51972aa131c8d6b0628517728b350552f58bdc19 |
|
MD5 | 81bc9b214e8cd99af830b5f50595a49a |
|
BLAKE2b-256 | c20c774529880b390328b13dbba5f9a158df649636767833d2f05b21fde2fe23 |
Hashes for llvmlite-0.38.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de8bd61480173930f2a029673e7cd0738fbbb5171dfe490340839ad7301d4cf0 |
|
MD5 | cc2eca5fdbafa07081b25c691342186f |
|
BLAKE2b-256 | 7a87b7a250cb3802b44d33979192ef53fc423948b5c8e617e3ffe658c5ec0fc2 |
Hashes for llvmlite-0.38.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a263252a68d85450110ec1f2b406c0414e49b04a4d216d31c0515ea1d59c3882 |
|
MD5 | 37f10a86af7cf595b742cb9628ddff5d |
|
BLAKE2b-256 | fbf00e51da58fa1ed04f81e729853224d9f70f8adf7d2087f8f9c3c40d1ba099 |
Hashes for llvmlite-0.38.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d5a0163c172db2b2ae561d2fc0866fbd9f716cf13f92c0d41ca4338e682672 |
|
MD5 | df27a80826db45c68f2384e64943cbb0 |
|
BLAKE2b-256 | 7bbfcb2db0ce7b861eaec8621e2493aa20d1172b1934f45dfc850d8944e607b8 |
Hashes for llvmlite-0.38.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9aa574eff2e15f8c47b255da0db5dab326dc7f76384c307ae35490e2d2489a |
|
MD5 | eaceea8366d38cc8fcf52d0d49500f67 |
|
BLAKE2b-256 | ed1e98b1fe7d9eeddabaeb4a86641f245f63440425cbc615397b4214dc8586e1 |
Hashes for llvmlite-0.38.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5559e46c79b4017c3c25edc3b9512d11adc3689b9046120c685b0905c08d48a5 |
|
MD5 | de6306d96f12f49c6f70c033689d6c74 |
|
BLAKE2b-256 | 4f0581fea956e359598f0c27d9c94dbc9645039084fb74052be17d5dd67fad03 |
Hashes for llvmlite-0.38.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c1e5805c92e049b4956ed01204c6647de6160ab9aefb0d67ea83ca02a1d889a |
|
MD5 | f1d1987002caa2bcf3809960f8d78105 |
|
BLAKE2b-256 | 7289090873c6e921a6560cadad914dc8e906628a615155ad622cd3404d997edd |
Hashes for llvmlite-0.38.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db018da2863034ad9c73c946625637f3a89635bc70576068bab4bd085eea90d |
|
MD5 | d4ce6019084ac34f04ad07c244852465 |
|
BLAKE2b-256 | fbc5d15af61581b958eae7b740de1050f2db8484f7707ea43caa5cb445a573a5 |
Hashes for llvmlite-0.38.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7528b8b85de930b76407e44b080e4f376b7a007c2879749599ff8e2fe32753 |
|
MD5 | a965227dd0fef0f745e4457cf359a043 |
|
BLAKE2b-256 | cdb3ef391866c48f594c3a710101c691a6346645d7d14d7c751b37cbaabcdd3d |