From dfc434f04fe34505db4f298323b5edd98eff0d63 Mon Sep 17 00:00:00 2001 From: Robert Blackwell Date: Mon, 5 Feb 2024 14:59:52 -0500 Subject: [PATCH] cuda-python: add deprecation warning for raw stream pointers --- python/cufinufft/cufinufft/_compat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/cufinufft/cufinufft/_compat.py b/python/cufinufft/cufinufft/_compat.py index 3e743dd16..54aa3a93b 100644 --- a/python/cufinufft/cufinufft/_compat.py +++ b/python/cufinufft/cufinufft/_compat.py @@ -1,7 +1,7 @@ import inspect import numpy as np - +import warnings def get_array_ptr(data): try: @@ -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