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 faster than llvmpy thanks to a much simpler architecture (the Numba test suite is twice faster than it was).
Compatibility
llvmlite has been tested with Python 3.9 – 3.12 and is likely to work with greater versions.
As of version 0.41.0, llvmlite requires LLVM 14.x.x on all architectures
Historical compatibility table:
llvmlite versions |
compatible LLVM versions |
---|---|
0.41.0 - … |
14.x.x |
0.40.0 - 0.40.1 |
11.x.x and 14.x.x (12.x.x and 13.x.x untested but may work) |
0.37.0 - 0.39.1 |
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.43.0rc1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03c772d8989e5751a8135694382fcaeac5f07280452814852dc65189911072ce |
|
MD5 | 0622c66380becd228ffc410c5d680f76 |
|
BLAKE2b-256 | d45964cdedaf4ab6046bc6951eeadf94fbe3961531312421e7c813a1f1d4a777 |
Hashes for llvmlite-0.43.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74ea3778e86fbe3defdf10b0a14c0982a465c61be6ff76f773b3562154bce88 |
|
MD5 | 328cd31d4cb6c5c3c7e7680801463614 |
|
BLAKE2b-256 | b268c0087cd4ec15b446bbfc35725e0c94438311382f04d0ee36726221fa5c04 |
Hashes for llvmlite-0.43.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47c2801366a35a5dde61977a1fafb8ff83f5dfd2b217751af756dc260e1d6ec |
|
MD5 | d0a3b992cf586d171d6b7ac4412fdbd3 |
|
BLAKE2b-256 | fb5eff41946f709a5c9b41a42ada1f41225c49b9b7cbb1aa50f1326924e42d16 |
Hashes for llvmlite-0.43.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e85b77f0f9b8f32b5184ee9af1d263de326da2f784380603cb05cf9fed1b049 |
|
MD5 | b2d627b6655278115513df474847614e |
|
BLAKE2b-256 | 908b98a4d7ec0aa023148eeddf9257b7794d65c31a1248dab0338ec53aded8a1 |
Hashes for llvmlite-0.43.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad54aa1eece2de9f915abde1a90a2be08b763c07a56e191561737d85d4879529 |
|
MD5 | 438ec1bf51205a0ae0dcb055c945ae2b |
|
BLAKE2b-256 | 78bb4230feabbdae36d3de3c7875b9655a08d931addc30922e9860cb072d2477 |
Hashes for llvmlite-0.43.0rc1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1bba6423312fc39de47bc508aa98b323d5df5320f2e8672f23a359db6a1d448 |
|
MD5 | 1afe9ce9a3730aee38ca12cad62e8de6 |
|
BLAKE2b-256 | 70204c890092fa75481dd83d41b224aa1decf5f14d0d42ac70d2455c3e615bc9 |
Hashes for llvmlite-0.43.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29576a7c0843641c455f9389bbdb30e7d8f7e7da9cf7eb3968a8f125f44893da |
|
MD5 | 5d4a0ed796c7653cea7486f1bbfe873d |
|
BLAKE2b-256 | 7745384e5db01fa651b90067c2ec8bd6b98c3a604087778729dbe798704c5a99 |
Hashes for llvmlite-0.43.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99cd4c0a7a0e648a1c0aebedb3d1c6e41857d15b3b27d31cc5881a6cec7a052a |
|
MD5 | 47af5ad26b5503b295d521aa26735f07 |
|
BLAKE2b-256 | 931116b864c250cb67ac0e0ea6fb49ff078b2ab40da738ba774c885eb89006d8 |
Hashes for llvmlite-0.43.0rc1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b39c46467f3ab2ecea1e9edd67b50b4e9119c41892820f50619fe6c952d5d96 |
|
MD5 | ab97b31a7ab7657912bcac7173f57e45 |
|
BLAKE2b-256 | a9145d43a0b9c463dcef55794d1553f530e26a60413665585d9e44c5b9ac179b |
Hashes for llvmlite-0.43.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd682e945dadd22dd7eff8ed8adf8e95e6b76017cba294cf15aa980d1bee106 |
|
MD5 | 07e6effa305837d4b2c40e5904ad13a6 |
|
BLAKE2b-256 | 4c2f07ea9aac78cd05ad574be263c48b920ddd87e55accb100e040413d9e6cf0 |
Hashes for llvmlite-0.43.0rc1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e853e53dec964c4357535ab1ac72ccd91e9e8d99af0892b734296fc43d57460 |
|
MD5 | 98a4e15585bb17e2d78d63aac1ae4e7f |
|
BLAKE2b-256 | ca161b1caf4787c7e65564aa7d582c4dcbc4bd8661f54320bdb3fb4f9fbe4191 |
Hashes for llvmlite-0.43.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 727df0774602f685d6445a11f2ef673d6981e7014c9ae64afb539445efd4c06b |
|
MD5 | 8a06904bd87af444fdf1c492eef5599a |
|
BLAKE2b-256 | fa3860500197eff32cb2ff1a7cca8de5623407547b90764e1c969827315957c0 |
Hashes for llvmlite-0.43.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91526244535eccb252746ec71e4e0fedf73f0b0bae10e215736e75ad53153e8b |
|
MD5 | 9a46602a133773b8c4dec12992faf1a2 |
|
BLAKE2b-256 | 9fd37adc21fa7fb41f0adffebfc91ac9ac7afefb6a4bf762a95453199eff8f1f |
Hashes for llvmlite-0.43.0rc1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44cbb3ff833d1b8d28d3e18f835f46d4e726b1d0f001512696b3d16cf6a2ed21 |
|
MD5 | 3fb5bd5d2a1f13383af02f94249e937e |
|
BLAKE2b-256 | 00c12ee3acb8ded24cda6bff185eae2dc51fc7adfc2cb9bbfc7fa8ebc6a19f5c |
Hashes for llvmlite-0.43.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7eda18f80bfa30a1c9509a4a9013704386e6f40531edd2c59d6686542d0cd99 |
|
MD5 | 5d4f4ca616641b6953b668ea6f7be3ea |
|
BLAKE2b-256 | fab99b600e74eb5305d876271157c5d82bda4059b0a5bb39ad3d29fc1ccc836c |
Hashes for llvmlite-0.43.0rc1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f905d2f28f04d59b86293ecb72b5b741a7376aa621cdc392c521f20a07475963 |
|
MD5 | 4eb1b46eb1c393cb0f971217edd1c474 |
|
BLAKE2b-256 | 5a3bf61b0e682685021aa8a66578eb5d78db3c1e049ad3094d3f11c3326c957d |
Hashes for llvmlite-0.43.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95351fbaa55ca155126d4ff8c8248ccb7b8259f785a0f17da6311e80cf4a0a03 |
|
MD5 | 88a2a43de4712825c9ae436b2c7f8ff7 |
|
BLAKE2b-256 | 53fbd6538b204f91e074d123a5d852a2487fb41f98714c6940cde37b3cd120c2 |
Hashes for llvmlite-0.43.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 988e7fd042893fa23c15d859d9b378d5d3003a6988fbaa8d9b2eb87903307612 |
|
MD5 | bcd312a967d27a2596fdd0ec09ac0c08 |
|
BLAKE2b-256 | 4a25037b0c3750203d4b9ae0c4f9fe7d5f191e69aefb7d5143f9151cf5a37f75 |
Hashes for llvmlite-0.43.0rc1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 238da7c4f54b27bf53c0e42cecfc9cd40a7e61001cf913c798dd65bce6b7d936 |
|
MD5 | 7440a9aa622c26b7264a3c75f450b4b6 |
|
BLAKE2b-256 | 90a1cc4c2310c36d0263d547a596a7c123db5f4ed94b3672cf3bd48480debd22 |
Hashes for llvmlite-0.43.0rc1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19fe36e58c185e4801d779e9d9ef223c09798bce2062fc12ecc68a52e3729ac1 |
|
MD5 | 1b765adb94d50561be86ed347ed7653d |
|
BLAKE2b-256 | d2d17364544dc0ce639904240ce6d2159bd23849afc97be03a33edad7dde3953 |