Numba 0.55.0 RC1

Numba 0.55.0rc1 announcement

Hi all,

On behalf of the Numba community, I am happy to announce the release of Numba 0.55.0 RC1. This release adds support for Python 3.10 and Numpy 1.21. There are over 130 Pull-Requests and 32 unique contributors.

For details, please refer to the change-logs at: Numba 0.55.0 RC1 release notes.

Installation

conda

Conda packages can be installed from the numba channel on anaconda.org with conda :

conda install -c numba numba=0.55.0rc1

For Python 3.10, you will need to get the numpy package from the numba channel as shown below:

conda install -c numba -c numba/label/numpy numba=0.55.0rc1 numpy=1.21

This is needed because conda has not officially support Python 3.10 fully. The numpy builds from our channel are for testing only.

Known issues

There are missing packages for:

  • win32 python 3.10
  • win64 python 3.10

Some AOT tests that uses the C compiler are known to fail for:

  • linux-ppc64le python 3.10
  • linux-aarch64 python3.9

pip

Wheels and source tarballs are available at https://pypi.org/project/numba/0.55.0rc1/:

pip install numba==0.55.0rc1

Please help us test

If you have time and inclination, please do test these release candidates with your own libraries and tools and report back any issues you may encounter!

Thank you again to all contributors for helping to improve Numba!

(ping @RC_Testers)

On a Jetson AGX Xavier (AArch64, Ubuntu 18.04), I create an environment with:

conda create -n testnumba055 python=3.9 numba::numba=0.55.0rc1 ipython

Then when running Numba in the environment I get:

(testnumba055) gmarkall@gm-agx:~$ python -c "import numba"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/__init__.py", line 38, in <module>
    from numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,
  File "/data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/core/decorators.py", line 12, in <module>
    from numba.stencils.stencil import stencil
  File "/data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/stencils/stencil.py", line 11, in <module>
    from numba.core import types, typing, utils, ir, config, ir_utils, registry
  File "/data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/core/ir_utils.py", line 16, in <module>
    from numba.core.extending import _Intrinsic
  File "/data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/core/extending.py", line 19, in <module>
    from numba.core.pythonapi import box, unbox, reflect, NativeValue  # noqa: F401
  File "/data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/core/pythonapi.py", line 12, in <module>
    from numba import _helperlib
ImportError: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /data/gmarkall/miniforge/envs/testnumba055/lib/python3.9/site-packages/numba/_helperlib.cpython-39-aarch64-linux-gnu.so)

I have the same issue with Python 3.8 on the Jetson:

$ conda create -n testnumba055py38 python=3.8 numba::numba=0.55.0rc

gives:

(testnumba055py38) gmarkall@gm-agx:~$ python -c "import numba"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/__init__.py", line 38, in <module>
    from numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,
  File "/data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/core/decorators.py", line 12, in <module>
    from numba.stencils.stencil import stencil
  File "/data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/stencils/stencil.py", line 11, in <module>
    from numba.core import types, typing, utils, ir, config, ir_utils, registry
  File "/data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/core/ir_utils.py", line 16, in <module>
    from numba.core.extending import _Intrinsic
  File "/data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/core/extending.py", line 19, in <module>
    from numba.core.pythonapi import box, unbox, reflect, NativeValue  # noqa: F401
  File "/data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/core/pythonapi.py", line 12, in <module>
    from numba import _helperlib
ImportError: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /data/gmarkall/miniforge/envs/testnumba055py38/lib/python3.8/site-packages/numba/_helperlib.cpython-38-aarch64-linux-gnu.so)

Hi All,

Tests on internal libraries pass fine for me on Python 3.8.5 running in a CentOS7 Docker container.

Installing on Windows in a freshly-created Python 3.10 conda environment with pip succeeded, but the wheel build failed due to a missing NumPy. Do we need to make a change to the wheel build to ensure availability of NumPy?

Log of output follows:

(numba055rc1py310) PS C:\> pip install numba==0.55.0rc1
Collecting numba==0.55.0rc1
  Downloading numba-0.55.0rc1.tar.gz (2.3 MB)
     |████████████████████████████████| 2.3 MB 3.3 MB/s
Collecting llvmlite<0.39,>=0.38.0rc1
  Downloading llvmlite-0.38.0rc1-cp310-cp310-win_amd64.whl (23.2 MB)
     |████████████████████████████████| 23.2 MB 3.3 MB/s
Collecting numpy<1.22,>=1.18
  Using cached numpy-1.21.5-cp310-cp310-win_amd64.whl (14.0 MB)
Requirement already satisfied: setuptools in c:\users\gmarkall\miniconda3\envs\numba055rc1py310\lib\site-packages (from numba==0.55.0rc1) (58.0.4)
Building wheels for collected packages: numba
  Building wheel for numba (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\gmarkall\Miniconda3\envs\numba055rc1py310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gmarkall\\AppData\\Local\\Temp\\pip-install-goeqmwcg\\numba_419b83dd1ceb434d9eb125bcdafaf3e0\\setup.py'"'"'; __file__='"'"'C:\\Users\\gmarkall\\AppData\\Local\\Temp\\pip-install-goeqmwcg\\numba_419b83dd1ceb434d9eb125bcdafaf3e0\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\gmarkall\AppData\Local\Temp\pip-wheel-ze1_lo0a'
       cwd: C:\Users\gmarkall\AppData\Local\Temp\pip-install-goeqmwcg\numba_419b83dd1ceb434d9eb125bcdafaf3e0\
  Complete output (7 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\gmarkall\AppData\Local\Temp\pip-install-goeqmwcg\numba_419b83dd1ceb434d9eb125bcdafaf3e0\setup.py", line 413, in <module>
      metadata['ext_modules'] = get_ext_modules()
    File "C:\Users\gmarkall\AppData\Local\Temp\pip-install-goeqmwcg\numba_419b83dd1ceb434d9eb125bcdafaf3e0\setup.py", line 141, in get_ext_modules
      import numpy.distutils.misc_util as np_misc
  ModuleNotFoundError: No module named 'numpy'
  ----------------------------------------
  ERROR: Failed building wheel for numba
  Running setup.py clean for numba
Failed to build numba
Installing collected packages: numpy, llvmlite, numba
    Running setup.py install for numba ... done
  DEPRECATION: numba was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Successfully installed llvmlite-0.38.0rc1 numba-0.55.0rc1 numpy-1.21.5

edit: this is on windows 10 with python 3.7.1. I observed similar messages with numba 0.54.x on RHELx with python 3.7.x (I’m a little hazy on the x, it was a while ago. I’ll get the details if anyone’s interested)

I’m seeing lots of warnings like this. They were new to 0.54.x, didn’t manifest before that.

I haven’t figured out a minimum reproducer yet but wanted to get it on the radar. They do all seem to be coming from structref implementations.

C:\work\git\mims\venv\lib\site-packages\numba\core\ssa.py:273: NumbaIRAssumptionWarning: e[1mvariable ‘ol_has_error__locals____v408_seamlessaccounts_has_error_v409__vphi38_0_2’ is not in scope.

This warning came from an internal pedantic check. Please report the warning
message and traceback, along with a minimal reproducer at:
Sign in to GitHub · GitHub

All tests passing for poliastro on Python 3.9:

$ conda create -n testnumba055 python=3.9 numba::numba=0.55.0rc1
$ conda activate testnumba055
(testnumba055) $ pip install -e .[test,cesium]
(testnumba055) $ pytest -m "not slow"
...
================== 970 passed, 50 skipped, 20 deselected, 6 xfailed, 13 warnings in 94.75s (0:01:34) ==================

I couldn’t test on Python 3.10 because pip started backtracking on pandas. When it reached a version without a wheel (1.3.2) I stopped it. I have no idea what causes it but I will have a look next year :slight_smile:

This looks like a regression: Incorrect result copying array-typed field of structured array in 0.55.0rc1 · Issue #7693 · numba/numba · GitHub

I have have reproduced this with 0.55.0.rc1 but haven’t managed to get a minimal reproducer.

The application runs and produces results that appear to be correct- is it safe to ignore this warning? I did look at numba/core/ssa.py but wasn’t smart enough to understand what’s going on there or why the warning was being triggered.

Edit: by ‘reproduced this’ I mean generating this warning

C:\work\git\mims\venv\lib\site-packages\numba\core\ssa.py:273: NumbaIRAssumptionWarning: e[1mvariable ‘ol_has_error__locals____v408_seamlessaccounts_has_error_v409__vphi38_0_2’ is not in scope.

All tests passing in my project. No performance regression.

Everything is passing in Bodo for Python < 3.10. I’ll test Python 3.10 this week and further benchmarking by the end of the week.

All tests pass with RBC

Many thanks to all those that have tested RC1, it’s much appreciated!

As discussed at the weekly public meeting yesterday…

There’s going to be an RC2 to fix a few small regressions/bugs, these are tracked here: Numba 0.55 RC2 Milestone · GitHub

There have been no large regressions/critical bugs reported for RC1 yet so hopefully RC2 will be near final. The aim is to tag RC2 near the end of next week (target is currently 20th January 2022).

Thanks again!