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

Replaces uses of cudf._lib.Column.from_unique_ptr with pylibcudf.Column.from_libcudf #17517

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions python/cudf/cudf/_lib/strings_udf.pyx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

from libc.stdint cimport uint8_t, uint16_t, uintptr_t

from pylibcudf.libcudf.strings_udf cimport (
get_character_cases_table as cpp_get_character_cases_table,
get_character_flags_table as cpp_get_character_flags_table,
Expand All @@ -27,6 +26,7 @@ from rmm.librmm.device_buffer cimport device_buffer
from rmm.pylibrmm.device_buffer cimport DeviceBuffer

from cudf._lib.column cimport Column
from pylibcudf cimport Column as plc_Column


def get_cuda_build_version():
Expand All @@ -52,9 +52,9 @@ def column_from_udf_string_array(DeviceBuffer d_buffer):
c_result = move(cpp_column_from_udf_string_array(data, size))
cpp_free_udf_string_array(data, size)

result = Column.from_unique_ptr(move(c_result))

return result
return Column.from_pylibcudf(
plc_Column.from_libcudf(move(c_result))
)


def get_character_flags_table_ptr():
Expand Down
11 changes: 6 additions & 5 deletions python/cudf/cudf/_lib/utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ from pylibcudf.libcudf.table.table_view cimport table_view
from pylibcudf.libcudf.types cimport size_type

from cudf._lib.column cimport Column

from pylibcudf cimport Column as plc_Column
try:
import ujson as json
except ImportError:
Expand Down Expand Up @@ -223,10 +223,11 @@ cdef columns_from_unique_ptr(

cdef size_t i

columns = [Column.from_unique_ptr(move(dereference(it+i)))
for i in range(c_columns.size())]

return columns
return [
Column.from_pylibcudf(
plc_Column.from_libcudf(move(dereference(it+i)))
) for i in range(c_columns.size())
]


cpdef columns_from_pylibcudf_table(tbl):
Expand Down
Loading