Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce dependencies on numba. #1761

Merged
merged 9 commits into from
Dec 20, 2024
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -295,6 +294,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- numba>=0.57
- pytest
- pytest-cov
specific:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion python/rmm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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`.
Expand Down
15 changes: 9 additions & 6 deletions python/rmm/rmm/_cuda/stream.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <cudaStream_t><uintptr_t>(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 = <cudaStream_t><uintptr_t>(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:
Expand Down
Loading