From dd8538e3e906d3e337eea848d2a7e4c5160d9904 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 16 Aug 2024 23:33:29 +0000 Subject: [PATCH 1/5] Update cuspatial to use pylibcudf --- python/cuproj/pyproject.toml | 2 +- .../cuspatial/_lib/cpp/column/geometry_column_view.pxd | 5 +++-- python/cuspatial/cuspatial/_lib/cpp/distance.pxd | 6 +++--- .../cuspatial/_lib/cpp/distance/polygon_distance.pxd | 2 +- .../cuspatial/_lib/cpp/linestring_bounding_boxes.pxd | 4 ++-- .../cuspatial/_lib/cpp/linestring_intersection.pxd | 5 +++-- python/cuspatial/cuspatial/_lib/cpp/nearest_points.pxd | 5 +++-- .../_lib/cpp/pairwise_multipoint_equals_count.pxd | 5 +++-- .../cuspatial/_lib/cpp/pairwise_point_in_polygon.pxd | 5 +++-- python/cuspatial/cuspatial/_lib/cpp/point_in_polygon.pxd | 5 +++-- python/cuspatial/cuspatial/_lib/cpp/points_in_range.pxd | 6 ++++-- .../cuspatial/_lib/cpp/polygon_bounding_boxes.pxd | 4 ++-- python/cuspatial/cuspatial/_lib/cpp/projection.pxd | 4 ++-- python/cuspatial/cuspatial/_lib/cpp/quadtree.pxd | 8 ++++---- python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd | 6 ++++-- python/cuspatial/cuspatial/_lib/cpp/trajectory.pxd | 8 ++++---- python/cuspatial/cuspatial/_lib/distance.pyx | 6 +++--- .../cuspatial/_lib/linestring_bounding_boxes.pyx | 4 ++-- python/cuspatial/cuspatial/_lib/nearest_points.pyx | 2 +- .../cuspatial/_lib/pairwise_multipoint_equals_count.pyx | 5 +++-- .../cuspatial/_lib/pairwise_point_in_polygon.pyx | 6 ++++-- python/cuspatial/cuspatial/_lib/point_in_polygon.pyx | 6 ++++-- python/cuspatial/cuspatial/_lib/points_in_range.pyx | 5 +++-- .../cuspatial/cuspatial/_lib/polygon_bounding_boxes.pyx | 4 ++-- python/cuspatial/cuspatial/_lib/quadtree.pyx | 8 ++++---- python/cuspatial/cuspatial/_lib/spatial.pyx | 4 ++-- python/cuspatial/cuspatial/_lib/spatial_join.pyx | 5 +++-- python/cuspatial/cuspatial/_lib/trajectory.pyx | 8 ++++---- python/cuspatial/cuspatial/_lib/utils.pxd | 2 +- python/cuspatial/cuspatial/_lib/utils.pyx | 2 +- python/cuspatial/pyproject.toml | 1 + 31 files changed, 83 insertions(+), 65 deletions(-) diff --git a/python/cuproj/pyproject.toml b/python/cuproj/pyproject.toml index 093c06d56..9d63f41e4 100644 --- a/python/cuproj/pyproject.toml +++ b/python/cuproj/pyproject.toml @@ -65,7 +65,7 @@ force_grid_wrap = 0 combine_as_imports = true order_by_type = true known_dask = ["dask", "distributed", "dask_cuda"] -known_rapids = ["rmm", "cudf"] +known_rapids = ["rmm", "cudf", "pylibcudf"] known_first_party = ["cuspatial", "cuproj"] default_section = "THIRDPARTY" sections = [ diff --git a/python/cuspatial/cuspatial/_lib/cpp/column/geometry_column_view.pxd b/python/cuspatial/cuspatial/_lib/cpp/column/geometry_column_view.pxd index 2b867a069..2c2568e7b 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/column/geometry_column_view.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/column/geometry_column_view.pxd @@ -1,8 +1,9 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.types cimport collection_type_id, geometry_type_id diff --git a/python/cuspatial/cuspatial/_lib/cpp/distance.pxd b/python/cuspatial/cuspatial/_lib/cpp/distance.pxd index 98925a516..855c8b527 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/distance.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/distance.pxd @@ -3,9 +3,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport pair -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table_view cimport table_view from cuspatial._lib.cpp.column.geometry_column_view cimport ( geometry_column_view, diff --git a/python/cuspatial/cuspatial/_lib/cpp/distance/polygon_distance.pxd b/python/cuspatial/cuspatial/_lib/cpp/distance/polygon_distance.pxd index 3a92adae3..2c9ca9826 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/distance/polygon_distance.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/distance/polygon_distance.pxd @@ -2,7 +2,7 @@ from libcpp.memory cimport unique_ptr -from cudf._lib.pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column cimport column from cuspatial._lib.cpp.column.geometry_column_view cimport ( geometry_column_view, diff --git a/python/cuspatial/cuspatial/_lib/cpp/linestring_bounding_boxes.pxd b/python/cuspatial/cuspatial/_lib/cpp/linestring_bounding_boxes.pxd index 8622a417c..6d95074af 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/linestring_bounding_boxes.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/linestring_bounding_boxes.pxd @@ -2,8 +2,8 @@ from libcpp.memory cimport unique_ptr -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table cdef extern from "cuspatial/bounding_boxes.hpp" \ diff --git a/python/cuspatial/cuspatial/_lib/cpp/linestring_intersection.pxd b/python/cuspatial/cuspatial/_lib/cpp/linestring_intersection.pxd index 0478c87de..e6a3a93f7 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/linestring_intersection.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/linestring_intersection.pxd @@ -1,8 +1,9 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.column.geometry_column_view cimport ( geometry_column_view, diff --git a/python/cuspatial/cuspatial/_lib/cpp/nearest_points.pxd b/python/cuspatial/cuspatial/_lib/cpp/nearest_points.pxd index 826505c30..3151be093 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/nearest_points.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/nearest_points.pxd @@ -1,8 +1,9 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.optional cimport optional diff --git a/python/cuspatial/cuspatial/_lib/cpp/pairwise_multipoint_equals_count.pxd b/python/cuspatial/cuspatial/_lib/cpp/pairwise_multipoint_equals_count.pxd index 5af573bd0..463c8998b 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/pairwise_multipoint_equals_count.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/pairwise_multipoint_equals_count.pxd @@ -1,8 +1,9 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.column.geometry_column_view cimport ( geometry_column_view, diff --git a/python/cuspatial/cuspatial/_lib/cpp/pairwise_point_in_polygon.pxd b/python/cuspatial/cuspatial/_lib/cpp/pairwise_point_in_polygon.pxd index a9f1f7622..07e8d1d92 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/pairwise_point_in_polygon.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/pairwise_point_in_polygon.pxd @@ -1,8 +1,9 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cuspatial/point_in_polygon.hpp" \ diff --git a/python/cuspatial/cuspatial/_lib/cpp/point_in_polygon.pxd b/python/cuspatial/cuspatial/_lib/cpp/point_in_polygon.pxd index 94facd936..6bda46812 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/point_in_polygon.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/point_in_polygon.pxd @@ -1,8 +1,9 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cuspatial/point_in_polygon.hpp" namespace "cuspatial" nogil: diff --git a/python/cuspatial/cuspatial/_lib/cpp/points_in_range.pxd b/python/cuspatial/cuspatial/_lib/cpp/points_in_range.pxd index d03b3a133..d5b150ed0 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/points_in_range.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/points_in_range.pxd @@ -2,8 +2,10 @@ from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column, column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cuspatial/points_in_range.hpp" namespace "cuspatial" nogil: diff --git a/python/cuspatial/cuspatial/_lib/cpp/polygon_bounding_boxes.pxd b/python/cuspatial/cuspatial/_lib/cpp/polygon_bounding_boxes.pxd index 45910626b..72bb23e53 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/polygon_bounding_boxes.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/polygon_bounding_boxes.pxd @@ -2,8 +2,8 @@ from libcpp.memory cimport unique_ptr -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table cdef extern from "cuspatial/bounding_boxes.hpp" \ diff --git a/python/cuspatial/cuspatial/_lib/cpp/projection.pxd b/python/cuspatial/cuspatial/_lib/cpp/projection.pxd index 724269486..23a95fc81 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/projection.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/projection.pxd @@ -3,8 +3,8 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cuspatial/projection.hpp" namespace "cuspatial" \ diff --git a/python/cuspatial/cuspatial/_lib/cpp/quadtree.pxd b/python/cuspatial/cuspatial/_lib/cpp/quadtree.pxd index db2dabaca..f3554f5ff 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/quadtree.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/quadtree.pxd @@ -4,10 +4,10 @@ from libc.stdint cimport int8_t from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type cdef extern from "cuspatial/point_quadtree.hpp" namespace "cuspatial" nogil: diff --git a/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd b/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd index ab96cf53c..907992907 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd @@ -3,8 +3,10 @@ from libc.stdint cimport int8_t from libcpp.memory cimport unique_ptr -from cudf._lib.column cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cuspatial/spatial_join.hpp" namespace "cuspatial" nogil: diff --git a/python/cuspatial/cuspatial/_lib/cpp/trajectory.pxd b/python/cuspatial/cuspatial/_lib/cpp/trajectory.pxd index 5940349cc..d15a71c5b 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/trajectory.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/trajectory.pxd @@ -3,10 +3,10 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type cdef extern from "cuspatial/trajectory.hpp" namespace "cuspatial" nogil: diff --git a/python/cuspatial/cuspatial/_lib/distance.pyx b/python/cuspatial/cuspatial/_lib/distance.pyx index 90e7b5ac0..0295dce92 100644 --- a/python/cuspatial/cuspatial/_lib/distance.pyx +++ b/python/cuspatial/cuspatial/_lib/distance.pyx @@ -4,10 +4,10 @@ from libcpp.memory cimport make_shared, shared_ptr, unique_ptr from libcpp.utility cimport move, pair from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.utils cimport columns_from_table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table_view cimport table_view from cuspatial._lib.cpp.column.geometry_column_view cimport ( geometry_column_view, diff --git a/python/cuspatial/cuspatial/_lib/linestring_bounding_boxes.pyx b/python/cuspatial/cuspatial/_lib/linestring_bounding_boxes.pyx index 4023f4965..0badef0d4 100644 --- a/python/cuspatial/cuspatial/_lib/linestring_bounding_boxes.pyx +++ b/python/cuspatial/cuspatial/_lib/linestring_bounding_boxes.pyx @@ -4,9 +4,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table from cudf._lib.utils cimport columns_from_unique_ptr +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table from cuspatial._lib.cpp.linestring_bounding_boxes cimport ( linestring_bounding_boxes as cpp_linestring_bounding_boxes, diff --git a/python/cuspatial/cuspatial/_lib/nearest_points.pyx b/python/cuspatial/cuspatial/_lib/nearest_points.pyx index da24357d3..6f64dba13 100644 --- a/python/cuspatial/cuspatial/_lib/nearest_points.pyx +++ b/python/cuspatial/cuspatial/_lib/nearest_points.pyx @@ -3,7 +3,7 @@ from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.nearest_points cimport ( pairwise_point_linestring_nearest_points as c_func, diff --git a/python/cuspatial/cuspatial/_lib/pairwise_multipoint_equals_count.pyx b/python/cuspatial/cuspatial/_lib/pairwise_multipoint_equals_count.pyx index aea144568..cca06afcc 100644 --- a/python/cuspatial/cuspatial/_lib/pairwise_multipoint_equals_count.pyx +++ b/python/cuspatial/cuspatial/_lib/pairwise_multipoint_equals_count.pyx @@ -1,9 +1,10 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport make_shared, shared_ptr, unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column, column +from cudf._lib.column cimport Column +from pylibcudf.libcudf.column.column cimport column from cuspatial._lib.cpp.column.geometry_column_view cimport ( geometry_column_view, diff --git a/python/cuspatial/cuspatial/_lib/pairwise_point_in_polygon.pyx b/python/cuspatial/cuspatial/_lib/pairwise_point_in_polygon.pyx index 8ce2c952e..84b442823 100644 --- a/python/cuspatial/cuspatial/_lib/pairwise_point_in_polygon.pyx +++ b/python/cuspatial/cuspatial/_lib/pairwise_point_in_polygon.pyx @@ -1,9 +1,11 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column, column, column_view +from cudf._lib.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.pairwise_point_in_polygon cimport ( pairwise_point_in_polygon as cpp_pairwise_point_in_polygon, diff --git a/python/cuspatial/cuspatial/_lib/point_in_polygon.pyx b/python/cuspatial/cuspatial/_lib/point_in_polygon.pyx index 1b585614d..833e87cc3 100644 --- a/python/cuspatial/cuspatial/_lib/point_in_polygon.pyx +++ b/python/cuspatial/cuspatial/_lib/point_in_polygon.pyx @@ -1,9 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column, column, column_view +from cudf._lib.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.point_in_polygon cimport ( point_in_polygon as cpp_point_in_polygon, diff --git a/python/cuspatial/cuspatial/_lib/points_in_range.pyx b/python/cuspatial/cuspatial/_lib/points_in_range.pyx index 4c25c2dbf..833dfbcfa 100644 --- a/python/cuspatial/cuspatial/_lib/points_in_range.pyx +++ b/python/cuspatial/cuspatial/_lib/points_in_range.pyx @@ -3,9 +3,10 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column, column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.column cimport Column from cudf._lib.utils cimport data_from_unique_ptr +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table from cuspatial._lib.cpp.points_in_range cimport ( points_in_range as cpp_points_in_range, diff --git a/python/cuspatial/cuspatial/_lib/polygon_bounding_boxes.pyx b/python/cuspatial/cuspatial/_lib/polygon_bounding_boxes.pyx index 0f963fd5a..bd01a08f5 100644 --- a/python/cuspatial/cuspatial/_lib/polygon_bounding_boxes.pyx +++ b/python/cuspatial/cuspatial/_lib/polygon_bounding_boxes.pyx @@ -4,9 +4,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table from cudf._lib.utils cimport columns_from_unique_ptr +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table from cuspatial._lib.cpp.polygon_bounding_boxes cimport ( polygon_bounding_boxes as cpp_polygon_bounding_boxes, diff --git a/python/cuspatial/cuspatial/_lib/quadtree.pyx b/python/cuspatial/cuspatial/_lib/quadtree.pyx index eb548a882..4f1a8395b 100644 --- a/python/cuspatial/cuspatial/_lib/quadtree.pyx +++ b/python/cuspatial/cuspatial/_lib/quadtree.pyx @@ -6,11 +6,11 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.utils cimport data_from_unique_ptr +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type from cuspatial._lib.cpp.quadtree cimport ( quadtree_on_points as cpp_quadtree_on_points, diff --git a/python/cuspatial/cuspatial/_lib/spatial.pyx b/python/cuspatial/cuspatial/_lib/spatial.pyx index 6698da904..0afe2484e 100644 --- a/python/cuspatial/cuspatial/_lib/spatial.pyx +++ b/python/cuspatial/cuspatial/_lib/spatial.pyx @@ -5,8 +5,8 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.projection cimport ( sinusoidal_projection as cpp_sinusoidal_projection, diff --git a/python/cuspatial/cuspatial/_lib/spatial_join.pyx b/python/cuspatial/cuspatial/_lib/spatial_join.pyx index 045014aba..04e62eff9 100644 --- a/python/cuspatial/cuspatial/_lib/spatial_join.pyx +++ b/python/cuspatial/cuspatial/_lib/spatial_join.pyx @@ -4,9 +4,10 @@ from libc.stdint cimport int8_t from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column, column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view +from cudf._lib.column cimport Column from cudf._lib.utils cimport data_from_unique_ptr, table_view_from_table +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table, table_view from cuspatial._lib.cpp.spatial_join cimport ( join_quadtree_and_bounding_boxes as cpp_join_quadtree_and_bounding_boxes, diff --git a/python/cuspatial/cuspatial/_lib/trajectory.pyx b/python/cuspatial/cuspatial/_lib/trajectory.pyx index df29dc05a..8c183f5f4 100644 --- a/python/cuspatial/cuspatial/_lib/trajectory.pyx +++ b/python/cuspatial/cuspatial/_lib/trajectory.pyx @@ -5,11 +5,11 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.utils cimport data_from_unique_ptr +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type from cuspatial._lib.cpp.trajectory cimport ( derive_trajectories as cpp_derive_trajectories, diff --git a/python/cuspatial/cuspatial/_lib/utils.pxd b/python/cuspatial/cuspatial/_lib/utils.pxd index ad1714016..5dff013cb 100644 --- a/python/cuspatial/cuspatial/_lib/utils.pxd +++ b/python/cuspatial/cuspatial/_lib/utils.pxd @@ -1,5 +1,5 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.optional cimport nullopt, optional diff --git a/python/cuspatial/cuspatial/_lib/utils.pyx b/python/cuspatial/cuspatial/_lib/utils.pyx index 4aea62863..9bc0b01ab 100644 --- a/python/cuspatial/cuspatial/_lib/utils.pyx +++ b/python/cuspatial/cuspatial/_lib/utils.pyx @@ -1,6 +1,6 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column_view cimport column_view from cuspatial._lib.cpp.optional cimport nullopt, optional diff --git a/python/cuspatial/pyproject.toml b/python/cuspatial/pyproject.toml index 8778080a0..05d278f39 100644 --- a/python/cuspatial/pyproject.toml +++ b/python/cuspatial/pyproject.toml @@ -72,6 +72,7 @@ known_dask = [ known_rapids = [ "rmm", "cudf", + "pylibcudf", ] known_first_party = [ "cuspatial", From 045aca90e5601d076ffa2642c12b1d5d26a33377 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 17 Aug 2024 00:01:38 +0000 Subject: [PATCH 2/5] Make pylibcudf dependency explicit since cuspatial cimports it directly --- conda/environments/all_cuda-118_arch-x86_64.yaml | 1 + conda/environments/all_cuda-125_arch-x86_64.yaml | 1 + dependencies.yaml | 3 +++ 3 files changed, 5 insertions(+) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 9d27ab23f..c223ebc29 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -39,6 +39,7 @@ dependencies: - proj - pydata-sphinx-theme!=0.14.2 - pydeck +- pylibcudf==24.10.*,>=0.0.0a0 - pytest - pytest-cov - pytest-xdist diff --git a/conda/environments/all_cuda-125_arch-x86_64.yaml b/conda/environments/all_cuda-125_arch-x86_64.yaml index 82d7fed83..2795c4b2e 100644 --- a/conda/environments/all_cuda-125_arch-x86_64.yaml +++ b/conda/environments/all_cuda-125_arch-x86_64.yaml @@ -41,6 +41,7 @@ dependencies: - proj - pydata-sphinx-theme!=0.14.2 - pydeck +- pylibcudf==24.10.*,>=0.0.0a0 - pytest - pytest-cov - pytest-xdist diff --git a/dependencies.yaml b/dependencies.yaml index d8f7b59b9..25fe6170f 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -424,6 +424,7 @@ dependencies: - output_types: conda packages: - &cudf_unsuffixed cudf==24.10.*,>=0.0.0a0 + - &pylibcudf_unsuffixed pylibcudf==24.10.*,>=0.0.0a0 - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -437,11 +438,13 @@ dependencies: cuda_suffixed: "true" packages: - cudf-cu12==24.10.*,>=0.0.0a0 + - pylibcudf-cu12==24.10.*,>=0.0.0a0 - matrix: cuda: "11.*" cuda_suffixed: "true" packages: - cudf-cu11==24.10.*,>=0.0.0a0 + - pylibcudf-cu11==24.10.*,>=0.0.0a0 - {matrix: null, packages: [*cudf_unsuffixed]} depends_on_cuml: From 2dd60925987baad731951aa54c2c4ad85e19e14d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 17 Aug 2024 00:30:38 +0000 Subject: [PATCH 3/5] Update update-version.sh --- ci/release/update-version.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index bc80d2c07..3f00dd7fb 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -43,6 +43,7 @@ done sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh DEPENDENCIES=( + pylibcudf cudf cuml cuspatial From 3de4049aa84428088805640f012fda95e00e164f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 17 Aug 2024 00:31:21 +0000 Subject: [PATCH 4/5] Add pylibcudf to conda recipe --- conda/recipes/cuspatial/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda/recipes/cuspatial/meta.yaml b/conda/recipes/cuspatial/meta.yaml index 1a4b39752..a418d8ce0 100644 --- a/conda/recipes/cuspatial/meta.yaml +++ b/conda/recipes/cuspatial/meta.yaml @@ -60,6 +60,7 @@ requirements: {% endif %} - cuda-version ={{ cuda_version }} - cudf ={{ minor_version }} + - pylibcudf ={{ minor_version }} - cython >=3.0.0 - libcuspatial ={{ version }} - python @@ -74,6 +75,7 @@ requirements: {% endif %} - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - cudf ={{ minor_version }} + - pylibcudf ={{ minor_version }} - geopandas >=0.11.0 - numpy >=1.23,<2.0a0 - python From 35583c1da3ac920c9a9e43ade72208bc0d9f41fb Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 17 Aug 2024 00:32:36 +0000 Subject: [PATCH 5/5] Remove unused cimport --- python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd | 1 - 1 file changed, 1 deletion(-) diff --git a/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd b/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd index 907992907..2aa024819 100644 --- a/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd +++ b/python/cuspatial/cuspatial/_lib/cpp/spatial_join.pxd @@ -3,7 +3,6 @@ from libc.stdint cimport int8_t from libcpp.memory cimport unique_ptr -from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table cimport table from pylibcudf.libcudf.table.table_view cimport table_view