Skip to content

Commit c05c817

Browse files
author
Diptorup Deb
committed
Add the Numba monkey patches
1 parent 59478be commit c05c817

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

numba_dpex/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@
1717
from numba import __version__ as numba_version
1818
from numba.np import arrayobj
1919
from numba.np.ufunc.decorators import Vectorize
20+
from numba.parfors import parfor
2021

2122
from numba_dpex._patches import _empty_nd_impl
2223
from numba_dpex.vectorizers import Vectorize as DpexVectorize
2324

24-
from .numba_patches import patch_mk_alloc
25+
from .numba_patches import patch_is_ufunc, patch_mk_alloc
26+
from .numba_patches.patch_parfor import (
27+
_arrayexpr_tree_to_ir as _patched_arrayexpr_tree_to_ir,
28+
)
2529

2630
# Monkey patches
27-
31+
patch_is_ufunc.patch()
32+
parfor._arrayexpr_tree_to_ir = _patched_arrayexpr_tree_to_ir
2833
arrayobj._empty_nd_impl = _empty_nd_impl
2934
patch_mk_alloc.patch()
3035

0 commit comments

Comments
 (0)