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

Add deprecation warning for set_allocator. #11958

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions python/cudf/cudf/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import hashlib
import os
import traceback
import warnings
from functools import partial
from typing import FrozenSet, Set, Union

Expand Down Expand Up @@ -213,6 +214,15 @@ def set_allocator(
Enable logging (default ``False``).
Enabling this option will introduce performance overhead.
"""
warnings.warn(
"The cudf.set_allocator function is deprecated and will be removed in "
"a future release. Please use rmm.reinitialize "
"(https://docs.rapids.ai/api/rmm/stable/api.html#rmm.reinitialize) "
'instead. Note that `cudf.set_allocator(allocator="managed")` is '
"equivalent to `rmm.reinitialize(managed_memory=True)`.",
FutureWarning,
)

use_managed_memory = allocator == "managed"

rmm.reinitialize(
Expand Down