Skip to content

Commit

Permalink
cuda-python: add deprecation warning for raw stream pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwer committed Feb 5, 2024
1 parent 410e9a6 commit dfc434f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/cufinufft/cufinufft/_compat.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import inspect

import numpy as np

import warnings

def get_array_ptr(data):
try:
Expand Down Expand Up @@ -30,6 +30,10 @@ def get_array_module(obj):
def get_stream_ptr(obj):
framework = get_array_module(obj)
if isinstance(obj, int):
warnings.warn("Raw stream pointers are deprecated and will be removed in version 2.4. "
"Please use your python GPU framework's stream object type directly.",
DeprecationWarning)

return obj
if framework == 'numba':
return obj.handle.value
Expand Down

0 comments on commit dfc434f

Please sign in to comment.