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

Acquire spill lock in to/from_arrow #13646

Merged
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
4 changes: 4 additions & 0 deletions python/cudf/cudf/_lib/interop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ from cudf._lib.cpp.table.table_view cimport table_view
from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns

from cudf.api.types import is_list_dtype, is_struct_dtype
from cudf.core.buffer import acquire_spill_lock


def from_dlpack(dlpack_capsule):
Expand Down Expand Up @@ -106,6 +107,7 @@ cdef vector[column_metadata] gather_metadata(object cols_dtypes) except *:
)
return cpp_metadata


cdef _set_col_children_metadata(dtype,
column_metadata& col_meta):

Expand Down Expand Up @@ -133,6 +135,7 @@ cdef _set_col_children_metadata(dtype,
col_meta.children_meta.push_back(column_metadata())


@acquire_spill_lock()
def to_arrow(list source_columns, object column_dtypes):
"""Convert a list of columns from
cudf Frame to a PyArrow Table.
Expand All @@ -158,6 +161,7 @@ def to_arrow(list source_columns, object column_dtypes):
return pyarrow_wrap_table(cpp_arrow_table)


@acquire_spill_lock()
def from_arrow(object input_table):
"""Convert from PyArrow Table to a list of columns.

Expand Down