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

Fix failed automerge Branch 23.02 merge 22.12 #811

Merged
merged 3 commits into from
Nov 22, 2022
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
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -9,8 +9,9 @@ python/ @rapidsai/cuspatial-python-codeowners
**/cmake/ @rapidsai/cuspatial-cmake-codeowners

# build/ops code owners
.github/ @rapidsai/ops-codeowners
.github/ @rapidsai/ops-codeowners
ci/ @rapidsai/ops-codeowners
conda/ @rapidsai/ops-codeowners
**/Dockerfile @rapidsai/ops-codeowners
**/.dockerignore @rapidsai/ops-codeowners
dependencies.yaml @rapidsai/ops-codeowners
12 changes: 12 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pr

on:
pull_request:

jobs:
checks:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@main
with:
enable_check_size: false
enable_check_style: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ git clone https://github.com/rapidsai/cuspatial.git $CUSPATIAL_HOME
2. clone the cuSpatial repo

```shell
conda env update --file conda/environments/cuspatial_dev_cuda11.5.yml
conda env update --file conda/environments/all_cuda-115_arch-x86_64.yaml
```

### Build and install cuSpatial
5 changes: 4 additions & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
@@ -42,8 +42,11 @@ sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cma
sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' python/cuspatial/CMakeLists.txt

# bump cudf
for FILE in conda/environments/*.yml; do
for FILE in dependencies.yaml conda/environments/*.yaml; do
sed_runner "s/cudf=${CURRENT_SHORT_TAG}/cudf=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/rmm=${CURRENT_SHORT_TAG}/rmm=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/libcudf=${CURRENT_SHORT_TAG}/libcudf=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/librmm=${CURRENT_SHORT_TAG}/librmm=${NEXT_SHORT_TAG}/g" ${FILE};
done

# Doxyfile update
34 changes: 34 additions & 0 deletions conda/environments/all_cuda-115_arch-x86_64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file is generated by `rapids-dependency-file-generator`.
# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
channels:
- rapidsai
- rapidsai-nightly
- conda-forge
- nvidia
dependencies:
- c-compiler
- cmake>=3.23.1,!=3.25.0
- cudatoolkit=11.5
- cudf=22.12.*
- cxx-compiler
- cython>=0.29,<0.30
- gcc_linux-64=9.*
- gdal>3.5.0,<3.6.0
- geopandas>=0.11.0
- gmock=1.10.0
- gtest=1.10.0
- libcudf=22.12.*
- librmm=22.12.*
- myst-parser
- ninja
- nvcc_linux-64=11.5
- pre-commit
- pydata-sphinx-theme
- pytest
- pytest-cov
- python>=3.8,<3.10
- rmm=22.12.*
- scikit-build>=0.13.1
- setuptools
- sysroot_linux-64==2.17
name: all_cuda-115_arch-x86_64
20 changes: 0 additions & 20 deletions conda/environments/cuspatial_dev_cuda11.5.yml

This file was deleted.

22 changes: 11 additions & 11 deletions cpp/include/cuspatial/detail/utility/linestring.cuh
Original file line number Diff line number Diff line change
@@ -154,19 +154,19 @@ __forceinline__ thrust::optional<segment<T>> __device__ collinear_or_parallel_ov
// Parallel
if (not_float_equal(det(ab, ac), T{0})) return thrust::nullopt;

// Must be on the same line, test if intersect
if ((a < c && c < b) || (a < d && d < b)) {
// Compute smallest interval between the segments
if (b < a) thrust::swap(a, b);
if (d < c) thrust::swap(c, d);
auto e0 = a > c ? a : c;
auto e1 = b < d ? b : d;
// Must be on the same line, sort the endpoints
if (b < a) thrust::swap(a, b);
if (d < c) thrust::swap(c, d);

// Decondition the coordinates
return segment<T>{e0 + center, e1 + center};
}
// Test if not overlap
if (b < c || d < a) return thrust::nullopt;

// Compute smallest interval between the segments
auto e0 = a > c ? a : c;
auto e1 = b < d ? b : d;

return thrust::nullopt;
// Decondition the coordinates
return segment<T>{e0 + center, e1 + center};
}

/**
26 changes: 26 additions & 0 deletions cpp/tests/experimental/operators/linestrings_test.cu
Original file line number Diff line number Diff line change
@@ -393,3 +393,29 @@ TYPED_TEST(SegmentIntersectionTest, Overlap8)

run_single_intersection_test(ab, cd, points_expected, segments_expected);
}

TYPED_TEST(SegmentIntersectionTest, Overlap9)
{
using T = TypeParam;

segment<T> ab{{0.0, 0.0}, {0.0, 1.0}};
segment<T> cd{{0.0, 0.25}, {0.0, 0.75}};

std::vector<thrust::optional<vec_2d<T>>> points_expected{thrust::nullopt};
std::vector<thrust::optional<segment<T>>> segments_expected{cd};

run_single_intersection_test(ab, cd, points_expected, segments_expected);
}

TYPED_TEST(SegmentIntersectionTest, Overlap10)
{
using T = TypeParam;

segment<T> ab{{0.0, 0.25}, {0.0, 0.75}};
segment<T> cd{{0.0, 0.0}, {0.0, 1.0}};

std::vector<thrust::optional<vec_2d<T>>> points_expected{thrust::nullopt};
std::vector<thrust::optional<segment<T>>> segments_expected{ab};

run_single_intersection_test(ab, cd, points_expected, segments_expected);
}
158 changes: 158 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Dependency list for https://github.com/rapidsai/dependency-file-generator
files:
all:
output: conda
matrix:
cuda: ["11.5"]
arch: [x86_64]
includes:
- build_cpp
- build_python
- cudatoolkit
- develop
- doc
- py_version
- run_python
- test_cpp
- test_python
test_cpp:
output: none
includes:
- cudatoolkit
- test_cpp
test_python:
output: none
includes:
- cudatoolkit
- py_version
- test_python
checks:
output: none
includes:
- build
- develop
channels:
- rapidsai
- rapidsai-nightly
- conda-forge
- nvidia
dependencies:
build_cpp:
common:
- output_types: conda
packages:
- &cmake_ver cmake>=3.23.1,!=3.25.0
- c-compiler
- cxx-compiler
- gdal>3.5.0,<3.6.0
- libcudf=22.12.*
- librmm=22.12.*
- ninja
specific:
- output_types: conda
matrices:
- matrix:
arch: x86_64
packages:
- &gcc_amd64 gcc_linux-64=9.*
- &sysroot_amd64 sysroot_linux-64==2.17
- matrix:
arch: aarch64
packages:
- &gcc_aarch64 gcc_linux-aarch64=9.*
- &sysroot_aarch64 sysroot_linux-aarch64==2.17
- output_types: conda
matrices:
- matrix:
arch: x86_64
cuda: "11.5"
packages:
- &nvcc_amd64_115 nvcc_linux-64=11.5
- matrix:
arch: aarch64
cuda: "11.5"
packages:
- &nvcc_aarch64_115 nvcc_linux-aarch64=11.5
build_python:
common:
- output_types: [conda, requirements]
packages:
- *cmake_ver
- &cudf_ver cudf=22.12.*
- cython>=0.29,<0.30
- scikit-build>=0.13.1
- setuptools
specific:
- output_types: conda
matrices:
- matrix:
arch: x86_64
packages:
- *gcc_amd64
- *sysroot_amd64
- matrix:
arch: aarch64
packages:
- *gcc_aarch64
- *sysroot_aarch64
cudatoolkit:
specific:
- output_types: conda
matrices:
- matrix:
cuda: "11.2"
packages:
- cudatoolkit=11.2
- matrix:
cuda: "11.4"
packages:
- cudatoolkit=11.4
- matrix:
cuda: "11.5"
packages:
- cudatoolkit=11.5
develop:
common:
- output_types: [conda, requirements]
packages:
- pre-commit
doc:
common:
- output_types: [conda, requirements]
packages:
- pydata-sphinx-theme
- myst-parser
py_version:
specific:
- output_types: conda
matrices:
- matrix:
py: "3.8"
packages:
- python=3.8
- matrix:
py: "3.9"
packages:
- python=3.9
- matrix:
packages:
- python>=3.8,<3.10
run_python:
common:
- output_types: [conda, requirements]
packages:
- *cudf_ver
- geopandas>=0.11.0
- rmm=22.12.*
test_cpp:
common:
- output_types: conda
packages:
- gtest=1.10.0
- gmock=1.10.0
test_python:
common:
- output_types: [conda, requirements]
packages:
- pytest
- pytest-cov