From 2ee69ed2318782c4feeefbc08777d445e75fc874 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 15 Jun 2021 22:32:58 +1200 Subject: [PATCH 1/9] Pin gdal to 3.3.x Bump `gdal` from 3.2.x to 3.3.x. Supersedes #347. --- conda/recipes/cuspatial/meta.yaml | 2 +- conda/recipes/libcuspatial/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/cuspatial/meta.yaml b/conda/recipes/cuspatial/meta.yaml index c86fd5e12..d71cf1fee 100644 --- a/conda/recipes/cuspatial/meta.yaml +++ b/conda/recipes/cuspatial/meta.yaml @@ -32,7 +32,7 @@ requirements: - python - cudf {{ minor_version }}.* - rmm {{ minor_version }}.* - - gdal >=3.2.0,<3.3.0a0 + - gdal >=3.3.0,<3.4.0a0 - geopandas >=0.9.0,<0.10.0a0 test: diff --git a/conda/recipes/libcuspatial/meta.yaml b/conda/recipes/libcuspatial/meta.yaml index 16571ffe5..d3a81797b 100644 --- a/conda/recipes/libcuspatial/meta.yaml +++ b/conda/recipes/libcuspatial/meta.yaml @@ -38,7 +38,7 @@ requirements: - libcudf {{ minor_version }}.* - librmm {{ minor_version }}.* - cudatoolkit {{ cuda_version }}.* - - gdal >=3.2.0,<3.3.0a0 + - gdal >=3.3.0,<3.4.0a0 run: - {{ pin_compatible('cudatoolkit', max_pin='x.x') }} From cfea6b808420be1c6bacbac1b586630f1997be1e Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 15 Jun 2021 23:02:07 +1200 Subject: [PATCH 2/9] Test cuspatial with gdal 3.3.0 --- ci/gpu/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 73729538e..9dc8ba641 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -44,9 +44,9 @@ conda activate rapids gpuci_conda_retry install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \ "rapids-build-env=$MINOR_VERSION.*" -# https://docs.rapids.ai/maintainers/depmgmt/ -# gpuci_conda_retry remove --force rapids-build-env -# gpuci_conda_retry install "your-pkg=1.0.0" +# https://docs.rapids.ai/maintainers/depmgmt/ +gpuci_conda_retry remove --force rapids-build-env +gpuci_conda_retry install "gdal=3.3.0" gpuci_logger "Check versions" python --version From febe51c95765b329d744181fb75a06886ed76306 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 6 Jul 2021 10:28:18 +1200 Subject: [PATCH 3/9] Test cuspatial with gdal 3.3.1 --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 9dc8ba641..541c8d3c0 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -46,7 +46,7 @@ gpuci_conda_retry install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \ # https://docs.rapids.ai/maintainers/depmgmt/ gpuci_conda_retry remove --force rapids-build-env -gpuci_conda_retry install "gdal=3.3.0" +gpuci_conda_retry install "gdal=3.3.1" gpuci_logger "Check versions" python --version From 1ed3045c29d3f912cec94cd1bb5b7b0a2b4a3eb6 Mon Sep 17 00:00:00 2001 From: "H. Thomson Comer" Date: Wed, 18 Aug 2021 16:17:12 -0500 Subject: [PATCH 4/9] Remove cudf.core --- python/cuspatial/cuspatial/core/indexing.py | 2 +- python/cuspatial/cuspatial/core/trajectory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cuspatial/cuspatial/core/indexing.py b/python/cuspatial/cuspatial/core/indexing.py index 23e8e48e4..115faaede 100644 --- a/python/cuspatial/cuspatial/core/indexing.py +++ b/python/cuspatial/cuspatial/core/indexing.py @@ -2,7 +2,7 @@ import warnings -from cudf.core import DataFrame, Series +from cudf import DataFrame, Series from cudf.core.column import as_column from cuspatial._lib.quadtree import ( diff --git a/python/cuspatial/cuspatial/core/trajectory.py b/python/cuspatial/cuspatial/core/trajectory.py index dba440578..7cd6df27f 100644 --- a/python/cuspatial/cuspatial/core/trajectory.py +++ b/python/cuspatial/cuspatial/core/trajectory.py @@ -2,7 +2,7 @@ import numpy as np -from cudf.core import DataFrame, Series +from cudf import DataFrame, Series from cudf.core.column import as_column from cuspatial._lib.trajectory import ( From 3baa7ec0bdcad0b71cf7205d0e19cc526fe55e63 Mon Sep 17 00:00:00 2001 From: "H. Thomson Comer" Date: Wed, 18 Aug 2021 21:02:12 -0500 Subject: [PATCH 5/9] Issue with gcpuci_mamba_retry attempted fix. --- ci/gpu/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 5931170a8..9e0b4fd97 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -45,8 +45,8 @@ gpuci_mamba_retry install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \ "rapids-build-env=$MINOR_VERSION.*" # https://docs.rapids.ai/maintainers/depmgmt/ -gpuci_mamba_retry remove --force rapids-build-env -gpuci_mamba_retry install "gdal=3.3.1" +# gpuci_mamba_retry remove --force rapids-build-env +# gpuci_mamba_retry install "gdal=3.3.1" gpuci_logger "Check versions" python --version From 748161f0c7f9ce3aeaa75349128b804c286bd989 Mon Sep 17 00:00:00 2001 From: Jordan Jacobelli Date: Thu, 19 Aug 2021 16:37:16 +0200 Subject: [PATCH 6/9] Update ci/gpu/build.sh Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- ci/gpu/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 9e0b4fd97..c66208b60 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -46,7 +46,7 @@ gpuci_mamba_retry install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \ # https://docs.rapids.ai/maintainers/depmgmt/ # gpuci_mamba_retry remove --force rapids-build-env -# gpuci_mamba_retry install "gdal=3.3.1" +# gpuci_mamba_retry install "your-pkg=1.0.0" gpuci_logger "Check versions" python --version From b3d5b90eed5650d53520309e7adeae825be5d925 Mon Sep 17 00:00:00 2001 From: "H. Thomson Comer" Date: Thu, 19 Aug 2021 15:32:40 -0500 Subject: [PATCH 7/9] Try a fix involving pointer ownership. --- .../join/point_in_polygon_test_large.cpp | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/cpp/tests/join/point_in_polygon_test_large.cpp b/cpp/tests/join/point_in_polygon_test_large.cpp index c9d9d1b51..1a9f48867 100644 --- a/cpp/tests/join/point_in_polygon_test_large.cpp +++ b/cpp/tests/join/point_in_polygon_test_large.cpp @@ -269,21 +269,21 @@ TYPED_TEST(PIPRefineTestLarge, TestLarge) actual_point_indices.shrink_to_fit(); actual_point_lengths.shrink_to_fit(); - cudf::test::expect_columns_equal( - fixed_width_column_wrapper(expected_poly_indices.begin(), - expected_poly_indices.end()), - fixed_width_column_wrapper(actual_poly_indices.begin(), actual_poly_indices.end()), - verbosity); - - cudf::test::expect_columns_equal( - fixed_width_column_wrapper(expected_point_indices.begin(), - expected_point_indices.end()), - fixed_width_column_wrapper(actual_point_indices.begin(), actual_point_indices.end()), - verbosity); - - cudf::test::expect_columns_equal( - fixed_width_column_wrapper(expected_point_lengths.begin(), - expected_point_lengths.end()), - fixed_width_column_wrapper(actual_point_lengths.begin(), actual_point_lengths.end()), - verbosity); + auto poly_a = fixed_width_column_wrapper(expected_poly_indices.begin(), + expected_poly_indices.end()); + auto poly_b = fixed_width_column_wrapper(actual_poly_indices.begin(), + actual_poly_indices.end()); + cudf::test::expect_columns_equal(poly_a, poly_b, verbosity); + + auto point_a = fixed_width_column_wrapper(expected_point_indices.begin(), + expected_point_indices.end()); + auto point_b = fixed_width_column_wrapper(actual_point_indices.begin(), + actual_point_indices.end()); + cudf::test::expect_columns_equal(point_a, point_b, verbosity); + + auto lengths_a = fixed_width_column_wrapper(expected_point_lengths.begin(), + expected_point_lengths.end()); + auto lengths_b = fixed_width_column_wrapper(actual_point_lengths.begin(), + actual_point_lengths.end()); + cudf::test::expect_columns_equal(lengths_a, lengths_b, verbosity); } From 088e63c98e0766ca968b4aefb59a6f60debee805 Mon Sep 17 00:00:00 2001 From: "H. Thomson Comer" Date: Fri, 20 Aug 2021 10:26:50 -0500 Subject: [PATCH 8/9] Run clang-format --- cpp/tests/join/point_in_polygon_test_large.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/tests/join/point_in_polygon_test_large.cpp b/cpp/tests/join/point_in_polygon_test_large.cpp index 1a9f48867..1e1e04dcc 100644 --- a/cpp/tests/join/point_in_polygon_test_large.cpp +++ b/cpp/tests/join/point_in_polygon_test_large.cpp @@ -271,19 +271,19 @@ TYPED_TEST(PIPRefineTestLarge, TestLarge) auto poly_a = fixed_width_column_wrapper(expected_poly_indices.begin(), expected_poly_indices.end()); - auto poly_b = fixed_width_column_wrapper(actual_poly_indices.begin(), - actual_poly_indices.end()); + auto poly_b = + fixed_width_column_wrapper(actual_poly_indices.begin(), actual_poly_indices.end()); cudf::test::expect_columns_equal(poly_a, poly_b, verbosity); auto point_a = fixed_width_column_wrapper(expected_point_indices.begin(), expected_point_indices.end()); - auto point_b = fixed_width_column_wrapper(actual_point_indices.begin(), - actual_point_indices.end()); + auto point_b = + fixed_width_column_wrapper(actual_point_indices.begin(), actual_point_indices.end()); cudf::test::expect_columns_equal(point_a, point_b, verbosity); auto lengths_a = fixed_width_column_wrapper(expected_point_lengths.begin(), expected_point_lengths.end()); - auto lengths_b = fixed_width_column_wrapper(actual_point_lengths.begin(), - actual_point_lengths.end()); + auto lengths_b = + fixed_width_column_wrapper(actual_point_lengths.begin(), actual_point_lengths.end()); cudf::test::expect_columns_equal(lengths_a, lengths_b, verbosity); } From 665a58df56f724459793b047b2dd339b14e04735 Mon Sep 17 00:00:00 2001 From: "H. Thomson Comer" Date: Fri, 20 Aug 2021 11:41:49 -0500 Subject: [PATCH 9/9] Potentially other undefined behaviors involving fixed_width_column_wrapper? --- .../join/point_in_polygon_test_large.cpp | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/cpp/tests/join/point_in_polygon_test_large.cpp b/cpp/tests/join/point_in_polygon_test_large.cpp index 1e1e04dcc..f93d4e0c5 100644 --- a/cpp/tests/join/point_in_polygon_test_large.cpp +++ b/cpp/tests/join/point_in_polygon_test_large.cpp @@ -153,8 +153,8 @@ TYPED_TEST(PIPRefineTestLarge, TestLarge) auto host_points = generate_points(quads, min_size); auto& h_x = std::get<0>(host_points); auto& h_y = std::get<1>(host_points); - fixed_width_column_wrapper x(h_x.begin(), h_x.end()); - fixed_width_column_wrapper y(h_y.begin(), h_y.end()); + auto x = fixed_width_column_wrapper(h_x.begin(), h_x.end()); + auto y = fixed_width_column_wrapper(h_y.begin(), h_y.end()); auto quadtree_pair = cuspatial::quadtree_on_points( x, y, x_min, x_max, y_min, y_max, scale, max_depth, min_size, this->mr()); @@ -164,54 +164,54 @@ TYPED_TEST(PIPRefineTestLarge, TestLarge) auto points = cudf::gather( cudf::table_view{{x, y}}, *point_indices, cudf::out_of_bounds_policy::DONT_CHECK, this->mr()); - fixed_width_column_wrapper poly_offsets({0, 1, 2, 3}); - fixed_width_column_wrapper ring_offsets({0, 4, 10, 14}); - fixed_width_column_wrapper poly_x({// ring 1 - 2.488450, - 1.333584, - 3.460720, - 2.488450, - // ring 2 - 5.039823, - 5.561707, - 7.103516, - 7.190674, - 5.998939, - 5.039823, - // ring 3 - 5.998939, - 5.573720, - 6.703534, - 5.998939, - // ring 4 - 2.088115, - 1.034892, - 2.415080, - 3.208660, - 2.088115}); - fixed_width_column_wrapper poly_y({// ring 1 - 5.856625, - 5.008840, - 4.586599, - 5.856625, - // ring 2 - 4.229242, - 1.825073, - 1.503906, - 4.025879, - 5.653384, - 4.229242, - // ring 3 - 1.235638, - 0.197808, - 0.086693, - 1.235638, - // ring 4 - 4.541529, - 3.530299, - 2.896937, - 3.745936, - 4.541529}); + auto poly_offsets = fixed_width_column_wrapper({0, 1, 2, 3}); + auto ring_offsets = fixed_width_column_wrapper({0, 4, 10, 14}); + auto poly_x = fixed_width_column_wrapper({// ring 1 + 2.488450, + 1.333584, + 3.460720, + 2.488450, + // ring 2 + 5.039823, + 5.561707, + 7.103516, + 7.190674, + 5.998939, + 5.039823, + // ring 3 + 5.998939, + 5.573720, + 6.703534, + 5.998939, + // ring 4 + 2.088115, + 1.034892, + 2.415080, + 3.208660, + 2.088115}); + auto poly_y = fixed_width_column_wrapper({// ring 1 + 5.856625, + 5.008840, + 4.586599, + 5.856625, + // ring 2 + 4.229242, + 1.825073, + 1.503906, + 4.025879, + 5.653384, + 4.229242, + // ring 3 + 1.235638, + 0.197808, + 0.086693, + 1.235638, + // ring 4 + 4.541529, + 3.530299, + 2.896937, + 3.745936, + 4.541529}); auto polygon_bboxes = cuspatial::polygon_bounding_boxes(poly_offsets, ring_offsets, poly_x, poly_y, this->mr());