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.39.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ebf1eb9badc2a397d4f6a6c8717447c81ac011db00064a00408bc83c923c0e4 |
|
MD5 | 6c063e5b5862292f04f6c761282b4e5c |
|
BLAKE2b-256 | 902cfd3adee418409d8be7f4de0e183ed5fb0d18359f5a2367906e659b03b669 |
Hashes for llvmlite-0.39.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0bfd18c324549c0fec2c5dc610fd024689de6f27c6cc67e4e24a07541d6e49b |
|
MD5 | e2edbe647264d5ddd26d3690863c2d4d |
|
BLAKE2b-256 | 091f629a04882c9b3dea4848337b80c9b550d8c713dce87528f7f8c3ab3b277f |
Hashes for llvmlite-0.39.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f56eb1eec3cda3a5c526bc3f63594fc24e0c8d219375afeb336f289764c6c7 |
|
MD5 | f1b3e94595f9868bd026a4293316efa9 |
|
BLAKE2b-256 | 91386b50b0a8ef737083dc2f4a359d42282b2fb104dae97674dcfc85a48c693b |
Hashes for llvmlite-0.39.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c00ff204afa721b0bb9835b5bf1ba7fba210eefcec5552a9e05a63219ba0dc |
|
MD5 | 39b4207ec1e0c5984c59c05b67f5a4a4 |
|
BLAKE2b-256 | 827d479ea497d2b453064c28e531339c070d70a4a92b8674dd587ab4e126d618 |
Hashes for llvmlite-0.39.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3f331a323d0f0ada6b10d60182ef06c20a2f01be21699999d204c5750ffd0b4 |
|
MD5 | c3b680a48a5a15ef19b716be30f74c89 |
|
BLAKE2b-256 | 3683b5125da6f8f59c9ed77e259444e30c67da3f287938a20a61ccaa8e0591e9 |
Hashes for llvmlite-0.39.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddab526c5a2c4ccb8c9ec4821fcea7606933dc53f510e2a6eebb45a418d3488a |
|
MD5 | 3b8bbcefb2ed7aeaa30f39884d809855 |
|
BLAKE2b-256 | d986685e82d14156becc7d260a80b46af3a079004f51657e4a2957cf872445cb |
Hashes for llvmlite-0.39.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6717c7a6e93c9d2c3d07c07113ec80ae24af45cde536b34363d4bcd9188091d9 |
|
MD5 | 1d44de695c1affc1fdefa692e5529c53 |
|
BLAKE2b-256 | d8fb7bb4a1fa11420dd01fdd8c370a5f2c812a70f1f8acf5a45c2b4c2c9d6338 |
Hashes for llvmlite-0.39.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fc14e757bc07a919221f0cbaacb512704ce5774d7fcada793f1996d6bc75f2a |
|
MD5 | e37b5d89930322045a3879eecd3541e0 |
|
BLAKE2b-256 | c838a65240eacb5a0e092b13e09a9466f8759654825a850d1b4cb28a6f932722 |
Hashes for llvmlite-0.39.1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03aee0ccd81735696474dc4f8b6be60774892a2929d6c05d093d17392c237f32 |
|
MD5 | f3ed14777664743645eb806425ce43dd |
|
BLAKE2b-256 | ca2f408d0c5583a5ebb3ca79c13c47b06c77084558c51d1fab4d015d14671c00 |
Hashes for llvmlite-0.39.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60f8dd1e76f47b3dbdee4b38d9189f3e020d22a173c00f930b52131001d801f9 |
|
MD5 | feb29579a5e9d0bc3be09de3a37062b4 |
|
BLAKE2b-256 | 94aea24ff97a39a8b4c60b93c63ccde867249c1d5dab03d790e85d64f99c0db3 |
Hashes for llvmlite-0.39.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ec3d70b3e507515936e475d9811305f52d049281eaa6c8273448a61c9b5b7e2 |
|
MD5 | d12ba8ddae6821f48783d43e79c534d3 |
|
BLAKE2b-256 | d4a642d47c9bbc67ded89504fb91c3b900eca7b89019a53bb5404da1bd56e2d5 |
Hashes for llvmlite-0.39.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39dc2160aed36e989610fc403487f11b8764b6650017ff367e45384dff88ffbf |
|
MD5 | b9b467aee9697df639ee79816da94b86 |
|
BLAKE2b-256 | 1161d2dc91f46c588cbf5b8e57f193d79dbd0d2352e9271808837f87281bd240 |
Hashes for llvmlite-0.39.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f212c018db951da3e1dc25c2651abc688221934739721f2dad5ff1dd5f90e7 |
|
MD5 | ca417c9b73205a26ad08d9383e8cd46b |
|
BLAKE2b-256 | 67d67623e80301e9f65b9ce3ac2656e29fab3c91a575e589750ee2a1b03decac |
Hashes for llvmlite-0.39.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa9b26939ae553bf30a9f5c4c754db0fb2d2677327f2511e674aa2f5df941789 |
|
MD5 | c4f5b4e172dc61b909d5f72bd4682c57 |
|
BLAKE2b-256 | 3e59a2f5a20268cd261fb81ce2134267fe6f947bbff9401dbc4f12cfeb089fa6 |
Hashes for llvmlite-0.39.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb62fc7016b592435d3e3a8f680e3ea8897c3c9e62e6e6cc58011e7a4801439e |
|
MD5 | bb07098ec564576896acf544b497e432 |
|
BLAKE2b-256 | 757f9055977016e713a5c033c376a9ea9cb3d1092a02ee1421c41ccbcc5aa043 |
Hashes for llvmlite-0.39.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c6ebace910410daf0bebda09c1859504fc2f33d122e9a971c4c349c89cca630 |
|
MD5 | f1845a1df7bc3c7ff9456e386487d514 |
|
BLAKE2b-256 | 8cdddbf1d9c68d91ee3e14bf962d195e18f877a26fdb6556dcfea8951e47e4e7 |
Hashes for llvmlite-0.39.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22d36591cd5d02038912321d9ab8e4668e53ae2211da5523f454e992b5e13c36 |
|
MD5 | 2d413f7a4fb06fc7f3b9c525c54d1e7a |
|
BLAKE2b-256 | f5d44cd3efa0a6e5f63b17ba7e383bb9e90f8008c539bb51dbe5bb7b7aabaed1 |
Hashes for llvmlite-0.39.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f158e4708dda6367d21cf15afc58de4ebce979c7a1aa2f6b977aae737e2a54 |
|
MD5 | 71d1cbb397dd710eeafc0ca5d9c5f1aa |
|
BLAKE2b-256 | 32ba545b37dd07a44889f6591c7994290b7a57cdcaaf0c795516b5593d65c424 |
Hashes for llvmlite-0.39.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffc84ade195abd4abcf0bd3b827b9140ae9ef90999429b9ea84d5df69c9058c |
|
MD5 | aac2981789fd703badefe2caa8f8c2c5 |
|
BLAKE2b-256 | 5affb655fa1764c0c764752496676ed0076631880535e2b67c34c776b1f9a9bc |
Hashes for llvmlite-0.39.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c0ea22e0b9dffb020601bb65cb11dd967a095a488be73f07d8867f4e327ca5 |
|
MD5 | 898635165127df7bd0ea2055aacb5947 |
|
BLAKE2b-256 | 45b55013d162337c07b11c946b2842bac146434a5c33f6e6e5011e6cf164bf83 |
Hashes for llvmlite-0.39.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e31f4b799d530255aaf0566e3da2df5bfc35d3cd9d6d5a3dcc251663656c27b1 |
|
MD5 | 5704df43d324f1267a1cb6e2906c680e |
|
BLAKE2b-256 | eb48497215f37f36562ad2c803f73f7878776e063c018b3fa935ba32cfc0bc40 |
Hashes for llvmlite-0.39.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e172c73fccf7d6db4bd6f7de963dedded900d1a5c6778733241d878ba613980e |
|
MD5 | be86ca5fdfa3da7d1f22a460aee438fe |
|
BLAKE2b-256 | be05af5fd325c52b73255a51691300f00b06177dfe1088b90ea20dd49c6e0c23 |
Hashes for llvmlite-0.39.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1a0bbdb274fb683f993198775b957d29a6f07b45d184c571ef2a721ce4388cf |
|
MD5 | dfd5c3dadbbc9659c8e425f9a654c4ec |
|
BLAKE2b-256 | dfe32e07af7ad70187756f28e480dec5e34701e44012f587fa9e5d0b61003a6d |
Hashes for llvmlite-0.39.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50aea09a2b933dab7c9df92361b1844ad3145bfb8dd2deb9cd8b8917d59306fb |
|
MD5 | 1aa9c905c290f8d86808965d977f6414 |
|
BLAKE2b-256 | 6f7815e11f84531c3e4e078ed2faa4e6e078ef2a0c06c6275020bc10c3865e9c |
Hashes for llvmlite-0.39.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3803f11ad5f6f6c3d2b545a303d68d9fabb1d50e06a8d6418e6fcd2d0df00959 |
|
MD5 | 826041278435f88e9c09992c317de9f6 |
|
BLAKE2b-256 | e30b68d4a88f76a6e11cc8701c48f63240ee1ce3be7463554212b4adaae1d2a8 |
Hashes for llvmlite-0.39.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1578f5000fdce513712e99543c50e93758a954297575610f48cb1fd71b27c08a |
|
MD5 | 2c3686f6194034b2a6e5dafc8db2de41 |
|
BLAKE2b-256 | 314e412c9f557ac007e5cac75c3593fe159db7f44d8caea4122b9251216737e1 |
Hashes for llvmlite-0.39.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6546bed4e02a1c3d53a22a0bced254b3b6894693318b16c16c8e43e29d6befb6 |
|
MD5 | d55113d6f4c88d56b3a38573611922a4 |
|
BLAKE2b-256 | 0731a5f5f578a2b19938e1bb91dcd79bd436557baf582dde23845cb0e76a2241 |