-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Numba #5592
base: main
Are you sure you want to change the base?
Add Numba #5592
Conversation
I like the idea of this! When we were using numba at work I hacked something similar. But, the main issue is the python installation, which a number of things are blocked on: virtual environments etc are troublesome to create and maintain over multiple OSes, and our installation system is not good with them: we install to a local directory and then relocate atomically to the "install" location at the moment and many python virtual environments don't work with this That's not to say we don't want this at all! I'm excited; but we have some infrastructural things to fix on our side! |
Numba wraps Python functions in
Dispatcher
objects. Each dispatcher contains zero or more compiled argument-type-indexed overloads of its function. We import the user's code as a module, and emit the code from all overloads of all dispatchers that the module publicly exposes.Name mangling is odd in Numba. It uses a similar syntax to C++, but also encodes non-symbol (
r"[^a-z0-9_]"
) characters as_%02x
. This encoding yields valid identifier names, so it is not strictly invertible. Here, I have hard-coded some replacements to decode some common cases.To do
Answer questions of [COMPILER REQUEST]: Numba #5591.
Install in https://github.com/compiler-explorer/infra
Locally, I have installed a virtual environment with
python3.11 -m venv venv_numba venv_numba/bin/python -m pip install numba==0.58.0 llvmlite==0.41.0 scipy==1.11.3 numpy==1.25.2 # (I recommend pinning versions because Python packages regularly violate SemVer, and CE wants long-term reproducibility.)
and configure its use with
Locally, I run this test suite with