Skip to content

Commit 4910970

Browse files
authored
Merge pull request #1129 from IntelPython/feature/switch_to_numba_0_58
Switch to numba 0.58
2 parents 8d0457b + 631d633 commit 4910970

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

.github/workflows/conda-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
PACKAGE_NAME: numba-dpex
1515
MODULE_NAME: numba_dpex
1616
# There is a separate action that removes defaults.
17-
CHANNELS: 'dppy/label/dev,conda-forge,intel'
17+
CHANNELS: 'dppy/label/dev,conda-forge,intel,numba,nodefaults'
1818
VER_JSON_NAME: 'version.json'
1919
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
2020
VER_SCRIPT2: "d = j['numba-dpex'][0]; print('='.join((d[s] for s in ('version', 'build'))))"

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
numpy_version:
1313
default: '1.24.3'
1414
numba_version:
15-
default: '0.57.0'
15+
default: '0.58'
1616
# dpcpp_llvm_spirv_version:
1717
# default: 'main'
1818
cython_version:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ARG CMAKE_VERSION_BUILD=4
4242

4343
# Python
4444
ARG INTEL_NUMPY_VERSION="==1.24.3"
45-
ARG INTEL_NUMBA_VERSION="==0.57.0"
45+
ARG INTEL_NUMBA_VERSION="==0.58"
4646
ARG CYTHON_VERSION="==0.29.35"
4747
ARG SCIKIT_BUILD_VERSION="==0.17.6"
4848

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- python=3.9
1111
- gxx_linux-64
1212
- dpcpp_linux-64
13-
- numba >=0.57*
13+
- numba ==0.58*
1414
- dpctl >=0.14*
1515
- dpnp >=0.11*
1616
- mkl >=2021.3.0 # for dpnp

environment/coverage.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ channels:
33
- dppy/label/dev
44
- numba
55
- intel
6-
- numba/label/dev
76
- conda-forge
87
- nodefaults
98
dependencies:
109
- libffi
1110
- gxx_linux-64
1211
- dpcpp_linux-64
13-
- numba=0.57
12+
- numba==0.58*
1413
- dpctl
1514
- dpnp
1615
- dpcpp-llvm-spirv

environment/docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ channels:
33
- dppy/label/dev
44
- numba
55
- intel
6-
- numba/label/dev
76
- conda-forge
87
- nodefaults
98
dependencies:
109
- libffi
1110
- gxx_linux-64
1211
- dpcpp_linux-64
13-
- numba=0.57
12+
- numba==0.58*
1413
- scikit-build>=0.15*
1514
- cmake>=3.26*
1615
- dpctl

numba_dpex/__init__.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,7 @@
1919

2020
from numba_dpex.vectorizers import Vectorize as DpexVectorize
2121

22-
from .numba_patches import (
23-
patch_arrayexpr_tree_to_ir,
24-
patch_is_ufunc,
25-
patch_mk_alloc,
26-
)
27-
28-
# Monkey patches
29-
patch_is_ufunc.patch()
30-
patch_mk_alloc.patch()
31-
patch_arrayexpr_tree_to_ir.patch()
22+
from .numba_patches import patch_arrayexpr_tree_to_ir, patch_is_ufunc
3223

3324

3425
def load_dpctl_sycl_interface():
@@ -77,12 +68,19 @@ def parse_sem_version(version_string: str) -> Tuple[int, int, int]:
7768

7869

7970
numba_sem_version = parse_sem_version(numba_version)
80-
if numba_sem_version < (0, 57, 0):
71+
if numba_sem_version < (0, 57, 0) or numba_sem_version >= (0, 59, 0):
8172
logging.warning(
82-
"numba_dpex needs numba 0.57.0, using "
73+
"numba_dpex needs at lease numba 0.57.0 but no more than 0.59.0, using "
8374
f"numba={numba_version} may cause unexpected behavior"
8475
)
8576

77+
# Monkey patches
78+
patch_is_ufunc.patch()
79+
if numba_sem_version < (0, 58, 0):
80+
from .numba_patches import patch_mk_alloc
81+
82+
patch_mk_alloc.patch()
83+
patch_arrayexpr_tree_to_ir.patch()
8684

8785
dpctl_sem_version = parse_sem_version(dpctl.__version__)
8886
if dpctl_sem_version < (0, 14):

0 commit comments

Comments
 (0)