diff --git a/dependencies.yaml b/dependencies.yaml index 671809a66..7f94f3f6e 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -274,7 +274,6 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: - - numba>=0.57 - numpy>=1.23,<3.0a0 specific: - output_types: [conda, requirements, pyproject] @@ -295,6 +294,7 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: + - numba>=0.57 - pytest - pytest-cov specific: @@ -309,7 +309,7 @@ dependencies: - cuda-nvcc - matrix: packages: - - output_types: [conda, requirements] + - output_types: [conda, requirements, pyproject] # Define additional constraints for testing with oldest dependencies. matrices: - matrix: diff --git a/python/rmm/pyproject.toml b/python/rmm/pyproject.toml index 6ff45a337..87795974f 100644 --- a/python/rmm/pyproject.toml +++ b/python/rmm/pyproject.toml @@ -31,7 +31,6 @@ license = { text = "Apache 2.0" } requires-python = ">=3.10" dependencies = [ "cuda-python>=11.8.5,<12.0a0", - "numba>=0.57", "numpy>=1.23,<3.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ @@ -47,6 +46,7 @@ classifiers = [ [project.optional-dependencies] test = [ + "numba>=0.57", "pytest", "pytest-cov", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. diff --git a/python/rmm/rmm/_cuda/stream.pyx b/python/rmm/rmm/_cuda/stream.pyx index 951f3f40c..e51f28721 100644 --- a/python/rmm/rmm/_cuda/stream.pyx +++ b/python/rmm/rmm/_cuda/stream.pyx @@ -90,12 +90,15 @@ cdef class Stream: return self.c_is_default() def _init_from_numba_stream(self, obj): - from numba import cuda - if isinstance(obj, cuda.cudadrv.driver.Stream): - self._cuda_stream = (int(obj)) - self._owner = obj - else: - raise TypeError(f"Cannot create stream from {type(obj)}") + try: + from numba import cuda + if isinstance(obj, cuda.cudadrv.driver.Stream): + self._cuda_stream = (int(obj)) + self._owner = obj + return + except ImportError: + pass + raise TypeError(f"Cannot create stream from {type(obj)}") def _init_from_cupy_stream(self, obj): try: