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.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72bd2e5db9790344ec39cef77098486635853829ecb0e66e6fa516488ff6dd9e |
|
MD5 | 0181cde5c48912f7b0a3c870b7dedca9 |
|
BLAKE2b-256 | 2bbbba409b05fee4611d7b49f70307814587529e56dac9c4bfab9af25eb4e78c |
Hashes for llvmlite-0.39.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c00bf7a8dc56b4b3618c65b67e75046410f751512871d9e23919cf1feb1007b2 |
|
MD5 | 75cefecffa857b897d9b8004a381ad25 |
|
BLAKE2b-256 | 18b21e85c73b9f492b7d2a86f73b9e67c6e2163c63503085f3581c3d941b3ea5 |
Hashes for llvmlite-0.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35db4122182cc5112912a3ec94a3c18eab9a990bd588bfda8445087c1b748563 |
|
MD5 | c994770811d348156bd9e68721d3a2c0 |
|
BLAKE2b-256 | cbadcc882a10e28d010784797493c716ff3d17b3130107cdf20cdcd9a89c143f |
Hashes for llvmlite-0.39.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4cb4f433b48792f02ec4ab619b86b145689302a3088a3f3853f50df6c2559d |
|
MD5 | d228dfa9ff4006d0c4201cbc9090d711 |
|
BLAKE2b-256 | ed772ddfd4436c8df8a8c9ed7eca22b52ce3cc0eb506ff4ced051420c8a662c6 |
Hashes for llvmlite-0.39.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d89f2ec4734d3e200fb90ea0b3ca5e9be40f3b3e50eb368ca9002ed5b3e4f8 |
|
MD5 | 4b198b4033c5c54403129c7b833c1ca0 |
|
BLAKE2b-256 | 4ff706dc235d1c32b949e2b9f551a4811409c7a5c10ef24491ada30e2d960d74 |
Hashes for llvmlite-0.39.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44a9a5cbe76db8ba01a5f6fa21649d91aa8a2634cc6f3a60291797e42e67d79e |
|
MD5 | aa1ebfdf507fcb5024bf58af13642894 |
|
BLAKE2b-256 | ad8bbc12e17e64f98e945e70f10036af8d0149ec8bb1903001c7414fa2556ea4 |
Hashes for llvmlite-0.39.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 589f08a1b1920e6004735819ce9aafdd85d030d4a231c1e7adaca9360724b1ed |
|
MD5 | 97161816cbc23c4fab53304cfd16bbb6 |
|
BLAKE2b-256 | 2239fe5cae5ea56643048b9eb5afd5505c6d57ac55867101c1c8a55e07b2fdf9 |
Hashes for llvmlite-0.39.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4a8199263859b97f174035e39297e770617d3497fac44fe738f74ce9c51d22b |
|
MD5 | 41927f5675a619dc8477c06b9edf363e |
|
BLAKE2b-256 | d402b406ae060caa8f72217a610f3569f7ea1bcb9d5ec3e69c486829226e00f0 |
Hashes for llvmlite-0.39.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0706abf522dc510ddc818f5c9e1cdae521a1416d3c399bbfc4827813379f0164 |
|
MD5 | 2c1d6dcfb73d6b0cf77515b1c144479f |
|
BLAKE2b-256 | 419951f59919b2ed4e0648bf2289823702be2c5d22705ced90978b281e9305fe |
Hashes for llvmlite-0.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ccfe736a12aef2e39450a22e4c027eee4f488c5786c81d0b18ff8a6cf52531 |
|
MD5 | 175f01ae50bc816eaf71c0865db4b424 |
|
BLAKE2b-256 | 4ae77bde84908ded5f18891a57f619e204194cf1d7901077f5f6ae0b1641b2bd |
Hashes for llvmlite-0.39.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7f7a7278ba6d75533be46abc3d9e242030ab017f0016dd081b55f821cc03be9 |
|
MD5 | c8ad3993eb1745e80a4287a7d3f70f5b |
|
BLAKE2b-256 | ad5a37e21eaae14d902b87833f42915dd552b4a015e26cf3bda5ea90522a789c |
Hashes for llvmlite-0.39.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f82d605c5d6c8df96fe19bc3a61c934580e24cafa694cbf79cb227cdc0e426a |
|
MD5 | 54aee29f037f3cad355039d8f2fd2412 |
|
BLAKE2b-256 | 2a2c0a603f98092af67b2d63a53142b380186e712e388f60266ba925fcad92b5 |
Hashes for llvmlite-0.39.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ea23c6bbcd25a7c050a26b6effe836a575a33183744cbc28fb21358b3801f8 |
|
MD5 | c1c9159dd9b2cfac94fa803b61dda7f4 |
|
BLAKE2b-256 | 6f8a041fd9d4da0777418d1c065041f1664a79a1a05bcddd3f682ddf8ffed3c7 |
Hashes for llvmlite-0.39.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0929e3c26bcafb53545c77bcf7020b943dcefcf8d7d3010f414384458f805cc1 |
|
MD5 | f1b6d8f4e324dc6263f2a0f236965565 |
|
BLAKE2b-256 | 8ca8662434530e58b12d3e4ef8f7c29fb730f76b1ccab326cb24e22356367d69 |
Hashes for llvmlite-0.39.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8149fdaab40ae48ea4ec816ae2ae5d36d664795e1b1dfb911fc2c62bc73184 |
|
MD5 | b78b800a74b4d5f65fcdc6f99da028a8 |
|
BLAKE2b-256 | 5ba0dd7e0bf3c5766f3e5c388287bdc5c591e21905ca6092f445120a73efed77 |
Hashes for llvmlite-0.39.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8e9463a7d0152994b6f7d630012297bb160db237ad9ca8e75c8dceef7a747cf |
|
MD5 | bc9f7af8367d8d0f51d120d89f10f913 |
|
BLAKE2b-256 | 8754b5fa9212421b3a3256ed512787dfeae413f15abdc9fbf058dff85d7d0c28 |
Hashes for llvmlite-0.39.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7292b394956749e51ae3d51a2085932a0e3261108b35eda61d702c1b977102c |
|
MD5 | aad79d0157b5123745bd47b2116c4d6c |
|
BLAKE2b-256 | dbfc827b189ec41e0b8619584ac85f7eb9c3b5ee09fedbc38dd5960a8cfdfefe |
Hashes for llvmlite-0.39.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cfd6688efd0f551168dd8626f386464aef25663268a2400c0f6a089b97a73dc |
|
MD5 | 9c75134116a8087405695a080b192054 |
|
BLAKE2b-256 | 6ed9f1e32d8a1edb27410b6d1d4609068b6ae110c5a5717b46cb02d27fb8b0c7 |
Hashes for llvmlite-0.39.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3df59a7c2b60764fb9eeaf9c442d757eca1f3e87298d4f88849203667528581e |
|
MD5 | 4cb2cc18c0bee21dc8049ead8ac18bc0 |
|
BLAKE2b-256 | 4def591ad6279c248fae96816f2b3c650778d890538a6594b326748db9479191 |
Hashes for llvmlite-0.39.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9272b7e344d12b36dafeb6911054eff32d2a9be7256a2866f0c09d08f945e17f |
|
MD5 | 47c80bab645912a16816544e927fa732 |
|
BLAKE2b-256 | 2cc9c12dcdd10d43e2edb1b5015b3c2672926b2bc3ea12fd4dba2ebf7a87b4b2 |
Hashes for llvmlite-0.39.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62a11b8e9e5fc4783d94da45d94c5a047ce6ccc4c112ae5f764109e9405fcc2c |
|
MD5 | 2da2de766cab69ae55ced262626def57 |
|
BLAKE2b-256 | da63a1e05d59fd08025328243d0ff51de03b323d3b2edf400eee75e1d28729e3 |
Hashes for llvmlite-0.39.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e461608135859ac40e39211d9c63a1ce35176513f6b8be87efb554d4af3a388 |
|
MD5 | 2be1d1420324d5c241b9739765b11c16 |
|
BLAKE2b-256 | 4aee0a45f7aee67c9e51c0c5c18a5689766fc2b4365cc8d140668ff870876ff3 |
Hashes for llvmlite-0.39.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ca4ea962da6ec3b007bedab17065781803d71159b03435f24ce6845cf3d1c66 |
|
MD5 | 038cda22861fc9c311d7afde9772fdd9 |
|
BLAKE2b-256 | 039a22fc7c316db0bf83b5526df0cd0208d1ff219a37ad44e8c9e606b45f089f |
Hashes for llvmlite-0.39.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f575fcb9bebe5bcbe20373c56ad3ebf63bae0e27d3c22c1a4dc27fa4666d0324 |
|
MD5 | 82cbbdeecf702dcddb9e31d59b3b057e |
|
BLAKE2b-256 | 3a94563b11114eaf2ac276ea2da57649952b4227ea6a2ce5709a8757859e7900 |
Hashes for llvmlite-0.39.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d733eb9c02bb8b01373228a1339901b1e50be4581105239c6052b9573ddb9298 |
|
MD5 | 0393930b6e996e1c8af801e1b3d83223 |
|
BLAKE2b-256 | ec40de958a1388d580b488528f5be2e1f4a7b1835664345a58305fd34cddf248 |
Hashes for llvmlite-0.39.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3bbd23e42593f85a842614d8ddb2b2943630e4c4c8418ea0d8cf1dce9f2fa7a |
|
MD5 | 15e54e27b4a4712e18c75b49d6cc9c93 |
|
BLAKE2b-256 | ef41340a5195cf71053be447b07ca20d3f8d685ab3179bc3b53c0cb4e6f879b4 |
Hashes for llvmlite-0.39.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c7c608baffdcdc2213926f4e3600036d4048aed08d6209b9f76a5439e529d6 |
|
MD5 | 224b5954dbf3a35c25d7466ec4c5932a |
|
BLAKE2b-256 | 3d0cbd8111f7bef10512fa77e0881c9619bccfc235f875d043d9026e00dbd7c6 |