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

Remove Cython libcpp wrappers #14382

Merged
merged 6 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies:
- cudatoolkit
- cupy>=12.0.0
- cxx-compiler
- cython>=3.0.0
- cython>=3.0.3
- dask-core>=2023.9.2
- dask-cuda==23.12.*
- dask>=2023.9.2
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
- cuda-version=12.0
- cupy>=12.0.0
- cxx-compiler
- cython>=3.0.0
- cython>=3.0.3
- dask-core>=2023.9.2
- dask-cuda==23.12.*
- dask>=2023.9.2
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ requirements:
host:
- protobuf ==4.24.*
- python
- cython >=3.0.0
- cython >=3.0.3
- scikit-build >=0.13.1
- setuptools
- dlpack >=0.5,<0.6.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cudf_kafka/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ requirements:
{% endif %}
host:
- python
- cython >=3.0.0
- cython >=3.0.3
- cuda-version ={{ cuda_version }}
- cudf ={{ version }}
- libcudf_kafka ={{ version }}
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- cython>=3.0.0
- cython>=3.0.3
# TODO: Pin to numpy<1.25 until cudf requires pandas 2
- &numpy numpy>=1.21,<1.25
- output_types: [conda, requirements, pyproject]
Expand Down
3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/column.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ from cudf.utils.dtypes import _get_base_dtype

from cpython.buffer cimport PyObject_CheckBuffer
from libc.stdint cimport uintptr_t
from libcpp.memory cimport unique_ptr
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.utility cimport move
from libcpp.vector cimport vector

Expand All @@ -47,7 +47,6 @@ from cudf._lib.cpp.column.column_factories cimport (
make_numeric_column,
)
from cudf._lib.cpp.column.column_view cimport column_view
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.null_mask cimport null_count as cpp_null_count
from cudf._lib.cpp.scalar.scalar cimport scalar
from cudf._lib.scalar cimport DeviceScalar
Expand Down
3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/concat.pyx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2020-2023, NVIDIA CORPORATION.

from libcpp cimport bool
from libcpp.memory cimport unique_ptr
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.utility cimport move
from libcpp.vector cimport vector

Expand All @@ -12,7 +12,6 @@ from cudf._lib.cpp.concatenate cimport (
concatenate_masks as libcudf_concatenate_masks,
concatenate_tables as libcudf_concatenate_tables,
)
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.table.table cimport table, table_view
from cudf._lib.utils cimport (
data_from_unique_ptr,
Expand Down
5 changes: 3 additions & 2 deletions python/cudf/cudf/_lib/copying.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ from cudf._lib.utils cimport table_view_from_columns, table_view_from_table
from cudf._lib.reduce import minmax
from cudf.core.abc import Serializable

from libcpp.functional cimport reference_wrapper
from libcpp.memory cimport make_unique

cimport cudf._lib.cpp.contiguous_split as cpp_contiguous_split
cimport cudf._lib.cpp.copying as cpp_copying
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view
from cudf._lib.cpp.libcpp.functional cimport reference_wrapper
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.lists.gather cimport (
segmented_gather as cpp_segmented_gather,
)
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/cpp/copying.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from libc.stdint cimport int32_t, int64_t, uint8_t
from libcpp cimport bool
from libcpp.functional cimport reference_wrapper
from libcpp.memory cimport unique_ptr
from libcpp.vector cimport vector

from rmm._lib.device_buffer cimport device_buffer

from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view
from cudf._lib.cpp.libcpp.functional cimport reference_wrapper
from cudf._lib.cpp.scalar.scalar cimport scalar
from cudf._lib.cpp.table.table cimport table
from cudf._lib.cpp.table.table_view cimport table_view
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/_lib/cpp/groupby.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2020-2021, NVIDIA CORPORATION.
# Copyright (c) 2020-2023, NVIDIA CORPORATION.

from libcpp cimport bool
from libcpp.functional cimport reference_wrapper
from libcpp.memory cimport unique_ptr
from libcpp.pair cimport pair
from libcpp.vector cimport vector
Expand All @@ -11,7 +12,6 @@ from cudf._lib.cpp.aggregation cimport (
)
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.column.column_view cimport column_view
from cudf._lib.cpp.libcpp.functional cimport reference_wrapper
from cudf._lib.cpp.replace cimport replace_policy
from cudf._lib.cpp.scalar.scalar cimport scalar
from cudf._lib.cpp.table.table cimport table
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/cpp/io/orc.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ from libc.stdint cimport uint8_t
from libcpp cimport bool
from libcpp.map cimport map
from libcpp.memory cimport shared_ptr, unique_ptr
from libcpp.optional cimport optional
from libcpp.string cimport string
from libcpp.vector cimport vector

cimport cudf._lib.cpp.io.types as cudf_io_types
cimport cudf._lib.cpp.table.table_view as cudf_table_view
from cudf._lib.cpp.libcpp.optional cimport optional
from cudf._lib.cpp.types cimport data_type, size_type


Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/_lib/cpp/io/parquet.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

from libc.stdint cimport uint8_t
from libcpp cimport bool
from libcpp.functional cimport reference_wrapper
from libcpp.map cimport map
from libcpp.memory cimport shared_ptr, unique_ptr
from libcpp.optional cimport optional
from libcpp.string cimport string
from libcpp.vector cimport vector

cimport cudf._lib.cpp.io.types as cudf_io_types
cimport cudf._lib.cpp.table.table_view as cudf_table_view
from cudf._lib.cpp.expressions cimport expression
from cudf._lib.cpp.libcpp.functional cimport reference_wrapper
from cudf._lib.cpp.libcpp.optional cimport optional
from cudf._lib.cpp.types cimport data_type, size_type


Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/cpp/io/timezone.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from libcpp cimport bool
from libcpp.memory cimport unique_ptr
from libcpp.optional cimport optional
from libcpp.string cimport string

from cudf._lib.cpp.libcpp.optional cimport optional
from cudf._lib.cpp.table.table cimport table


Expand Down
Empty file.
Empty file.
7 changes: 0 additions & 7 deletions python/cudf/cudf/_lib/cpp/libcpp/functional.pxd

This file was deleted.

12 changes: 0 additions & 12 deletions python/cudf/cudf/_lib/cpp/libcpp/memory.pxd

This file was deleted.

50 changes: 0 additions & 50 deletions python/cudf/cudf/_lib/cpp/libcpp/optional.pxd

This file was deleted.

3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/expressions.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ from enum import Enum

from cython.operator cimport dereference
from libc.stdint cimport int64_t
from libcpp.memory cimport unique_ptr
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.string cimport string
from libcpp.utility cimport move

from cudf._lib.cpp cimport expressions as libcudf_exp
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.types cimport size_type

# Necessary for proper casting, see below.
Expand Down
3 changes: 2 additions & 1 deletion python/cudf/cudf/_lib/groupby.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns

from cudf._lib.scalar import as_device_scalar

from libcpp.functional cimport reference_wrapper

cimport cudf._lib.cpp.groupby as libcudf_groupby
cimport cudf._lib.cpp.types as libcudf_types
from cudf._lib.aggregation cimport (
Expand All @@ -33,7 +35,6 @@ from cudf._lib.aggregation cimport (
make_groupby_scan_aggregation,
)
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.libcpp.functional cimport reference_wrapper
from cudf._lib.cpp.replace cimport replace_policy
from cudf._lib.cpp.scalar.scalar cimport scalar
from cudf._lib.cpp.table.table cimport table, table_view
Expand Down
3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/join.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from cudf.core.buffer import acquire_spill_lock

from libcpp.memory cimport unique_ptr
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.pair cimport pair
from libcpp.utility cimport move

Expand All @@ -11,7 +11,6 @@ from rmm._lib.device_buffer cimport device_buffer
cimport cudf._lib.cpp.join as cpp_join
from cudf._lib.column cimport Column
from cudf._lib.cpp.column.column cimport column
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.table.table_view cimport table_view
from cudf._lib.cpp.types cimport data_type, size_type, type_id
from cudf._lib.utils cimport table_view_from_columns
Expand Down
3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/null_mask.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer

from cudf.core.buffer import acquire_spill_lock, as_buffer

from libcpp.memory cimport unique_ptr
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.pair cimport pair
from libcpp.utility cimport move

from cudf._lib.column cimport Column
from cudf._lib.cpp.column.column_view cimport column_view
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.null_mask cimport (
bitmask_allocation_size_bytes as cpp_bitmask_allocation_size_bytes,
bitmask_and as cpp_bitmask_and,
Expand Down
3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/parquet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ from cudf._lib.utils import _index_level_name, generate_pandas_metadata
from libc.stdint cimport uint8_t
from libcpp cimport bool
from libcpp.map cimport map
from libcpp.memory cimport unique_ptr
from libcpp.memory cimport make_unique, unique_ptr
from libcpp.string cimport string
from libcpp.unordered_map cimport unordered_map
from libcpp.utility cimport move
Expand All @@ -52,7 +52,6 @@ from cudf._lib.cpp.io.parquet cimport (
write_parquet as parquet_writer,
)
from cudf._lib.cpp.io.types cimport column_in_metadata, table_input_metadata
from cudf._lib.cpp.libcpp.memory cimport make_unique
from cudf._lib.cpp.table.table_view cimport table_view
from cudf._lib.cpp.types cimport data_type, size_type
from cudf._lib.io.datasource cimport NativeFileDatasource
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/timezone.pyx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright (c) 2023, NVIDIA CORPORATION.

from libcpp.memory cimport unique_ptr
from libcpp.optional cimport make_optional
from libcpp.string cimport string
from libcpp.utility cimport move

from cudf._lib.cpp.io.timezone cimport (
make_timezone_transition_table as cpp_make_timezone_transition_table,
)
from cudf._lib.cpp.libcpp.optional cimport make_optional
from cudf._lib.cpp.table.table cimport table
from cudf._lib.utils cimport columns_from_unique_ptr

Expand Down
2 changes: 1 addition & 1 deletion python/cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
build-backend = "setuptools.build_meta"
requires = [
"cmake>=3.26.4",
"cython>=3.0.0",
"cython>=3.0.3",
"ninja",
"numpy>=1.21,<1.25",
"protoc-wheel",
Expand Down
2 changes: 1 addition & 1 deletion python/cudf_kafka/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[build-system]

requires = [
"cython>=3.0.0",
"cython>=3.0.3",
"numpy>=1.21,<1.25",
"pyarrow==14.0.0.*",
"setuptools",
Expand Down
Loading