Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: macOS
vmImage: macos-11
matrix:
py37_np118:
PYTHON: '3.7'
py38_np118:
Comment thread
jamesobutler marked this conversation as resolved.
Resolved
PYTHON: '3.8'
NUMPY: '1.18'
CONDA_ENV: 'azure_ci'
TEST_START_INDEX: 0
Expand All @@ -29,8 +29,8 @@ jobs:
name: Linux
vmImage: ubuntu-20.04
matrix:
py37_np118_vanilla:
PYTHON: '3.7'
py38_np118_vanilla:
PYTHON: '3.8'
NUMPY: '1.18'
CONDA_ENV: azure_ci
VANILLA_INSTALL: yes
Expand Down Expand Up @@ -67,11 +67,10 @@ jobs:
CONDA_ENV: azure_ci
BUILD_DOC: yes
TEST_START_INDEX: 7
py38_np120_pickle5:
py38_np120:
PYTHON: '3.8'
NUMPY: '1.20'
CONDA_ENV: azure_ci
TEST_PICKLE5: yes
TEST_START_INDEX: 8
py38_np120_svml:
PYTHON: '3.8'
Expand Down
4 changes: 2 additions & 2 deletions buildscripts/azure/azure-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
NUMPY: '1.23'
CONDA_ENV: 'testenv'
TEST_START_INDEX: 17
py37_np118:
PYTHON: '3.7'
py38_np118:
PYTHON: '3.8'
NUMPY: '1.18'
CONDA_ENV: 'testenv'
TEST_START_INDEX: 18
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/condarecipe.local/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ requirements:
# available.
- tbb-devel >=2021,<2021.6 # [not (aarch64 or ppc64le)]
run:
- python >=3.7
- python >=3.8
# NumPy 1.22.0, 1.22.1, 1.22.2 are all broken for ufuncs, see #7756
- numpy >=1.18, !=1.22.0, !=1.22.1, !=1.22.2
- setuptools
Expand Down
2 changes: 0 additions & 2 deletions buildscripts/incremental/setup_conda_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ if [ "$RUN_COVERAGE" == "yes" ]; then $PIP_INSTALL codecov; fi
if [ "$TEST_SVML" == "yes" ]; then $CONDA_INSTALL -c numba icc_rt; fi
# Install Intel TBB parallel backend
if [ "$TEST_THREADING" == "tbb" ]; then $CONDA_INSTALL -c numba tbb=2021 "tbb-devel>=2021,<2021.6"; fi
# Install pickle5
if [ "$TEST_PICKLE5" == "yes" ]; then $PIP_INSTALL pickle5; fi
# Install typeguard
if [ "$RUN_TYPEGUARD" == "yes" ]; then $CONDA_INSTALL conda-forge::typeguard; fi

Expand Down
2 changes: 1 addition & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: rtd
channels:
- numba/label/dev
dependencies:
- python=3.7
- python=3.8
Comment thread
jamesobutler marked this conversation as resolved.
Resolved
- llvmlite=0.40
- numpy
- numpydoc
Expand Down
2 changes: 1 addition & 1 deletion docs/source/cuda/cudapysupported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ The following functions from the :mod:`math` module are supported:
* :func:`math.log10`
* :func:`math.log1p`
* :func:`math.sqrt`
* :func:`math.remainder`: Python 3.7+
* :func:`math.remainder`
* :func:`math.pow`
* :func:`math.ceil`
* :func:`math.floor`
Expand Down
4 changes: 0 additions & 4 deletions docs/source/developer/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ overloaded signatures compiled for the function. The *object code* is stored in
files with an ``.nbc`` extension, one file per overload. The data in both files
is serialized with :mod:`pickle`.

.. note:: On Python <=3.7, Numba extends ``pickle`` using the pure-Python
pickler. To use the faster C Pickler, install ``pickle5``
from ``pip``. ``pickle5`` backports Python 3.8 pickler features.


Requirements for Cacheability
-----------------------------
Expand Down
100 changes: 65 additions & 35 deletions docs/source/user/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,60 +82,90 @@ Example output::
System info:
--------------------------------------------------------------------------------
__Time Stamp__
2019-05-07 14:15:39.733994
Report started (local time) : 2022-11-30 15:40:42.368114
UTC start time : 2022-11-30 15:40:42.368129
Running time (s) : 2.563586

__Hardware Information__
Machine : x86_64
CPU Name : haswell
CPU count : 8
CPU Features :
aes avx avx2 bmi bmi2 cmov cx16 f16c fma fsgsbase invpcid lzcnt mmx movbe pclmul
popcnt rdrnd sahf sse sse2 sse3 sse4.1 sse4.2 ssse3 xsave xsaveopt
CPU Name : ivybridge
CPU Count : 3
Number of accessible CPUs : ?
List of accessible CPUs cores : ?
CFS Restrictions (CPUs worth of runtime) : None

CPU Features : 64bit aes avx cmov cx16 cx8 f16c
fsgsbase fxsr mmx pclmul popcnt
rdrnd sahf sse sse2 sse3 sse4.1
sse4.2 ssse3 xsave

Memory Total (MB) : 14336
Memory Available (MB) : 11540

__OS Information__
Platform : Darwin-18.5.0-x86_64-i386-64bit
Release : 18.5.0
System Name : Darwin
Version : Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64
OS specific info : 10.14.4 x86_64
Platform Name : macOS-10.16-x86_64-i386-64bit
Platform Release : 20.6.0
OS Name : Darwin
OS Version : Darwin Kernel Version 20.6.0: Thu Sep 29 20:15:11 PDT 2022; root:xnu-7195.141.42~1/RELEASE_X86_64
OS Specific Version : 10.16 x86_64
Libc Version : ?

__Python Information__
Python Compiler : Clang 4.0.1 (tags/RELEASE_401/final)
Python Compiler : Clang 14.0.6
Python Implementation : CPython
Python Version : 3.7.3
Python Locale : en_US UTF-8
Python Version : 3.10.8
Python Locale : en_US.UTF-8

__LLVM information__
LLVM version : 7.0.0
__Numba Toolchain Versions__
Numba Version : 0+untagged.gb91eec710
llvmlite Version : 0.40.0dev0+43.g7783803

__LLVM Information__
LLVM Version : 11.1.0

__CUDA Information__
CUDA driver library cannot be found or no CUDA enabled devices are present.
Error class: <class 'numba.cuda.cudadrv.error.CudaSupportError'>
CUDA Device Initialized : False
CUDA Driver Version : ?
CUDA Runtime Version : ?
CUDA NVIDIA Bindings Available : ?
CUDA NVIDIA Bindings In Use : ?
CUDA Detect Output:
None
CUDA Libraries Test Output:
None

__NumPy Information__
NumPy Version : 1.23.4
NumPy Supported SIMD features : ('MMX', 'SSE', 'SSE2', 'SSE3', 'SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX', 'F16C')
NumPy Supported SIMD dispatch : ('SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX', 'F16C', 'FMA3', 'AVX2', 'AVX512F', 'AVX512CD', 'AVX512_KNL', 'AVX512_SKX', 'AVX512_CLX', 'AVX512_CNL', 'AVX512_ICL')
NumPy Supported SIMD baseline : ('SSE', 'SSE2', 'SSE3')
NumPy AVX512_SKX support detected : False

__SVML Information__
SVML state, config.USING_SVML : False
SVML library found and loaded : False
llvmlite using SVML patched LLVM : True
SVML operational : False
SVML State, config.USING_SVML : False
SVML Library Loaded : False
llvmlite Using SVML Patched LLVM : True
SVML Operational : False

__Threading Layer Information__
TBB Threading layer available : False
+--> Disabled due to : Unknown import problem.
OpenMP Threading layer available : False
+--> Disabled due to : Unknown import problem.
Workqueue Threading layer available : True
TBB Threading Layer Available : True
+-->TBB imported successfully.
OpenMP Threading Layer Available : True
+-->Vendor: Intel
Workqueue Threading Layer Available : True
+-->Workqueue imported successfully.

__Numba Environment Variable Information__
None set.
None found.

__Conda Information__
conda_build_version : 3.17.8
conda_env_version : 4.6.14
platform : osx-64
python_version : 3.7.3.final.0
root_writable : True
Conda Build : not installed
Conda Env : 4.12.0
Conda Platform : osx-64
Conda Python Version : 3.9.12.final.0
Conda Root Writable : True

__Current Conda Env__
__Installed Packages__
(output truncated due to length)

.. _cli_debug:
Expand All @@ -153,7 +183,7 @@ To try it out, create an example script called ``myscript.py``::
@numba.jit
def f(x):
return 2 * x

f(42)

and then execute one of the following commands::
Expand Down
4 changes: 1 addition & 3 deletions docs/source/user/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation
Compatibility
-------------

Numba is compatible with Python 3.7--3.10, and NumPy versions 1.18 or later.
Numba is compatible with Python 3.8--3.10, and NumPy versions 1.18 or later.

Our supported platforms are:

Expand Down Expand Up @@ -229,8 +229,6 @@ vary with target operating system and hardware. The following lists them all
inspection. `See here <https://github.com/radareorg/radare2>`_ for
information on obtaining and installing.
* ``graphviz`` - for some CFG inspection functionality.
* ``pickle5`` - provides Python 3.8 pickling features for faster pickling in
Python 3.7.
* ``typeguard`` - used by ``runtests.py`` for
:ref:`runtime type-checking <type_anno_check>`.
* ``cuda-python`` - The NVIDIA CUDA Python bindings. See :ref:`cuda-bindings`.
Expand Down
4 changes: 2 additions & 2 deletions numba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def _ensure_critical_deps():
from numba.np.numpy_support import numpy_version
from numba.core.utils import PYVERSION

if PYVERSION < (3, 7):
msg = ("Numba needs Python 3.7 or greater. Got Python "
if PYVERSION < (3, 8):
msg = ("Numba needs Python 3.8 or greater. Got Python "
f"{PYVERSION[0]}.{PYVERSION[1]}.")
raise ImportError(msg)

Expand Down
8 changes: 2 additions & 6 deletions numba/_dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,15 +1155,11 @@ static PyTypeObject DispatcherType = {
0, /* tp_del */
0, /* tp_version_tag */
0, /* tp_finalize */
#if PY_MAJOR_VERSION == 3
/* Python 3.8 has two slots, 3.9 has one. */
#if PY_MINOR_VERSION > 7
0, /* tp_vectorcall */
#if PY_MINOR_VERSION == 8
/* Python 3.8 has two slots. */
#if (PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION == 8)
0, /* tp_print */
#endif
#endif
#endif
};


Expand Down
30 changes: 6 additions & 24 deletions numba/_dynfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,11 @@ static PyTypeObject EnvironmentType = {
0, /* tp_del */
0, /* tp_version_tag */
0, /* tp_finalize */
#if PY_MAJOR_VERSION == 3
/* Python 3.8 has two slots, 3.9 has one. */
#if PY_MINOR_VERSION > 7
0, /* tp_vectorcall */
#if PY_MINOR_VERSION == 8
/* Python 3.8 has two slots. */
#if (PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION == 8)
0, /* tp_print */
#endif
#endif
#endif
};

/* A closure object is created for each call to make_function(), and stored
Expand Down Expand Up @@ -245,15 +241,11 @@ static PyTypeObject ClosureType = {
0, /* tp_del */
0, /* tp_version_tag */
0, /* tp_finalize */
#if PY_MAJOR_VERSION == 3
/* Python 3.8 has two slots, 3.9 has one. */
#if PY_MINOR_VERSION > 7
0, /* tp_vectorcall */
#if PY_MINOR_VERSION == 8
/* Python 3.8 has two slots. */
#if (PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION == 8)
0, /* tp_print */
#endif
#endif
#endif
};


Expand Down Expand Up @@ -382,13 +374,7 @@ generator_dealloc(GeneratorObject *gen)
PyObject_ClearWeakRefs((PyObject *) gen);
/* XXX The finalizer may be called after the LLVM module has been
destroyed (typically at interpreter shutdown) */
#if PY_MAJOR_VERSION >= 3
#if PY_MINOR_VERSION >= 7
if (!_Py_IsFinalizing())
#else
if (!_Py_Finalizing)
#endif
#endif
if (gen->finalizer != NULL)
gen->finalizer(gen->state);
Py_XDECREF(gen->env);
Expand Down Expand Up @@ -462,15 +448,11 @@ static PyTypeObject GeneratorType = {
0, /* tp_del */
0, /* tp_version_tag */
0, /* tp_finalize */
#if PY_MAJOR_VERSION == 3
/* Python 3.8 has two slots, 3.9 has one. */
#if PY_MINOR_VERSION > 7
0, /* tp_vectorcall */
#if PY_MINOR_VERSION == 8
/* Python 3.8 has two slots. */
#if (PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION == 8)
0, /* tp_print */
#endif
#endif
#endif
};

/* Dynamically create a new generator object */
Expand Down
4 changes: 0 additions & 4 deletions numba/_helperlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,7 @@ int reraise_exc_is_none(void) {
/* Reraise */
PyThreadState *tstate = PyThreadState_GET();
PyObject *tb, *type, *value;
#if (PY_MAJOR_VERSION >= 3) && (PY_MINOR_VERSION >= 7)
_PyErr_StackItem *tstate_exc = tstate->exc_info;
#else
PyThreadState *tstate_exc = tstate;
#endif
type = tstate_exc->exc_type;
value = tstate_exc->exc_value;
tb = tstate_exc->exc_traceback;
Expand Down
4 changes: 1 addition & 3 deletions numba/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
if verbose:
print("unable to find command, tried %s" % (commands,))
return None
stdout = p.communicate()[0].strip()
if sys.version_info[0] >= 3:
stdout = stdout.decode()
stdout = p.communicate()[0].strip().decode()
if p.returncode != 0:
if verbose:
print("unable to run %s (error)" % args[0])
Expand Down
5 changes: 3 additions & 2 deletions numba/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
from itertools import permutations, takewhile
from contextlib import contextmanager
from functools import cached_property

from llvmlite import ir as llvmir
from llvmlite.ir import Constant
Expand Down Expand Up @@ -329,14 +330,14 @@ def get_data_packer(self, fe_types):
def target_data(self):
raise NotImplementedError

@utils.cached_property
@cached_property
def nonconst_module_attrs(self):
"""
All module attrs are constant for targets using BaseContext.
"""
return tuple()

@utils.cached_property
@cached_property
def nrt(self):
from numba.core.runtime.context import NRTContext
return NRTContext(self, self.enable_nrt)
Expand Down
Loading