-
Notifications
You must be signed in to change notification settings - Fork 132
[REVIEW] Use Numba 0.49+ API where required #53
Conversation
numba/numba#5197 refactors many of Numba's submodules. Mirror the required import changes in cusignal.
Can one of the admins verify this patch? |
rerun tests |
@BradReesWork -- can you comment on this part:
I'm guessing we just need to be more explicit on the Numba version used in https://github.com/rapidsai/cusignal/blob/branch-0.14/conda/environments/cusignal_base.yml |
rerun tests |
@gmarkall Do you know when Numba 49 will be out of RC and be considered stable/latest? |
@mnicely I think this may occur within the next couple of weeks. |
Also - the original import ( numba/numba#5528 Once 0.49RC2 is out, the original code may (should!) still work. If it's preferred to avoid being more specific about the version of Numba we use, something like the following should provide compatibility with both versions: diff --git a/python/cusignal/_upfirdn.py b/python/cusignal/_upfirdn.py
index 033d5ac..ed5a17d 100644
--- a/python/cusignal/_upfirdn.py
+++ b/python/cusignal/_upfirdn.py
@@ -17,7 +17,12 @@ from string import Template
import cupy as cp
from numba import complex64, complex128, cuda, float32, float64, int64, void
-from numba.core.types.scalars import Complex
+try:
+ # Numba <= 0.49
+ from numba.types.scalars import Complex
+except ImportError:
+ # Numba >= 0.49
+ from numba.core.types.scalars import Complex
_numba_kernel_cache = {}
_cupy_kernel_cache = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like @gmarkall's suggestion on handling the discrepancies in Numba versions:
try:
# Numba <= 0.49
from numba.types.scalars import Complex
except ImportError:
# Numba >= 0.49
from numba.core.types.scalars import Complex
If you try the import in that order with a
Maybe reverse the order? This seems to suppress the warning for both cases.
|
You should have min / max version numbers for external libraries in the conda environment file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be depreciated, approving to merge PR
rerun tests |
rerun tests |
@raydouglass @BradReesWork Looks like CI is stuck on this PR. Any chance ya'll can look behind the curtain so we can get this merged? |
ok to test |
numba/numba#5197 refactors many of Numba's submodules. Mirror the required import changes in cusignal.
This keeps cusignal in sync with numba master and the 0.49 release candidate but breaks compatibility with the current numba release (0.48).
This should go in eventually but also needs to make sure we keep compatibility with whatever version of numba we're getting in the conda channels selected by our packaging (and certainly updates the minimum required version) - need help with this part.