Skip to content

Commit

Permalink
Merge branch 'branch-24.12' into deps-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Nov 1, 2024
2 parents d8e8fb5 + 8d49fff commit d8689dc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/rmm/rmm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings

from rmm import mr
from rmm._version import __git_commit__, __version__
from rmm.mr import disable_logging, enable_logging, get_log_filenames
Expand Down Expand Up @@ -58,6 +60,12 @@ def __getattr__(name):
if name == "_lib":
import importlib

warnings.warn(
"The `rmm._lib` module is deprecated in will be removed in a future release. Use `rmm.pylibrmm` instead.",
FutureWarning,
stacklevel=2,
)

module = importlib.import_module("rmm.pylibrmm")
return module
else:
Expand Down
8 changes: 8 additions & 0 deletions python/rmm/rmm/_lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings

from rmm.pylibrmm import *

warnings.warn(
"The `rmm._lib` module is deprecated in will be removed in a future release. Use `rmm.pylibrmm` instead.",
FutureWarning,
stacklevel=2,
)
6 changes: 6 additions & 0 deletions python/rmm/rmm/tests/test_rmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,3 +1076,9 @@ def test_available_device_memory():
assert initial_memory[1] == final_memory[1]
assert initial_memory[0] > 0
assert final_memory[0] > 0


# TODO: Remove test when rmm._lib is removed in 25.02
def test_deprecate_rmm_lib():
with pytest.warns(FutureWarning):
rmm._lib.device_buffer.DeviceBuffer(size=100)

0 comments on commit d8689dc

Please sign in to comment.