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

[RELEASE] cuspatial v21.06 #409

Merged
merged 32 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
07137da
DOC v0.20 Updates
raydouglass Mar 25, 2021
78e3db6
Merge branch 'branch-0.19' into branch-0.20
raydouglass Apr 7, 2021
c44f92d
Merge pull request #374 from raydouglass/branch-0.20-merge-0.19
ajschmidt8 Apr 8, 2021
9705dcc
Merge pull request #376 from rapidsai/branch-0.19
GPUtester Apr 8, 2021
662f813
Merge pull request #377 from rapidsai/branch-0.19
GPUtester Apr 8, 2021
de08ce8
Update to new Thrust 1.12.0 APIs (#379)
trxcllnt Apr 12, 2021
6d7d0d0
Update cuSpatial to use C++17 (#382)
trxcllnt Apr 13, 2021
5e9cc46
Fix OOM in directed_hausdorff_distances (#378)
trxcllnt Apr 14, 2021
2a26282
Update cuspatial to use `rmm::cuda_stream_default` everywhere (#384)
trxcllnt Apr 15, 2021
a7f61a1
Update CUDA version in build scripts (#383)
ajschmidt8 Apr 16, 2021
d7cbb99
Use custom conda build directory for ccache (#368)
dillon-cullinan Apr 16, 2021
728e0fd
Update to CPM with fix for `FETCHCONTENT_BASE_DIR` (#386)
trxcllnt Apr 19, 2021
9562e6b
ENH Remove conda defaults channel in dev environments (#391)
jjacobelli Apr 30, 2021
f00db98
Remove references to deprecated "rmm/thrust_rmm_allocator.h" (#388)
harrism Apr 30, 2021
e9f8b7c
fix -Werror=sign-compare causing debug builds to fail (#392)
trxcllnt May 4, 2021
6077510
Merge remote-tracking branch 'upstream/branch-0.19' into branch-0.20-…
ajschmidt8 May 4, 2021
66e12e3
Merge pull request #394 from ajschmidt8/branch-0.20-merge-0.19
ajschmidt8 May 4, 2021
14a5942
Remove progress output on conda packages upload (#396)
jjacobelli May 6, 2021
6603fa0
Remove 'rapidsai-nightly' conda channel when building main branch (#395)
jjacobelli May 6, 2021
e4a791e
Update release script (#398)
raydouglass May 13, 2021
4cbc923
Import `_version` in `__init__.py` so that `versioneer` can be used. …
thomcom May 13, 2021
0b4052e
Pass compiler environment variables to conda python build (#400)
jjacobelli May 17, 2021
63a6706
DOC Update to v21.06.00
raydouglass May 17, 2021
e0ee443
Update cuspatial version for calver, fix CMake FindPackage cudf (#401)
trxcllnt May 18, 2021
a38c661
Update docs build script (#402)
ajschmidt8 May 19, 2021
6eb044e
Improve performance of quadtree point-to-polyline join (#362)
trxcllnt May 20, 2021
633e9cb
Update `CHANGELOG.md` links for calver (#404)
ajschmidt8 May 20, 2021
2e45b3f
Move rmm::device_buffer instead of copying (#403)
harrism May 21, 2021
4c6b258
`from_geopandas` converts GeoPandas GeoSeries objects into cuspatial …
thomcom May 21, 2021
0cd8f7c
Update environment variable used to determine `cuda_version` (#407)
ajschmidt8 May 24, 2021
7d6a041
FIX update-version.sh for CalVer (#412)
raydouglass Jun 9, 2021
4896437
update changelog
raydouglass Jun 9, 2021
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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# cuSpatial 21.06.00 (Date TBD)

Please see https://github.com/rapidsai/cuspatial/releases/tag/v21.06.00a for the latest changes to this development branch.

# cuSpatial 0.19.0 (21 Apr 2021)

## 🐛 Bug Fixes
Expand Down Expand Up @@ -56,7 +60,7 @@
- PR #320 Fix quadtree construction bug: zero out `device_uvector` before `scatter`
- PR #328 Fix point in polygon test for cudf::gather breaking change

# cuSpatial 0.16.0 (Date TBD)
# cuSpatial 0.16.0 (21 Oct 2020)

## New Features
- PR #290 Add Java bindings and a cuSpatial JAR package for Java users.
Expand Down
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,38 @@
**NOTE:** cuSpatial depends on [cuDF](https://github.com/rapidsai/cudf) and
[RMM](https://github.com/rapidsai/rmm) from [RAPIDS](https://rapids.ai/).

## Implemented operations:
## Operations

cuSpatial supports the following operations on spatial and trajectory data:

1. Spatial window query
2. Point-in-polygon test
3. Haversine distance
4. Hausdorff distance
5. Deriving trajectories from point location data
6. Computing distance/speed of trajectories
7. Computing spatial bounding boxes of trajectories
8. Quadtree-based indexing for large-scale point data
9. Quadtree-based point-in-polygon spatial join
10. Quadtree-based point-to-polyline nearest neighbor distance

Future support is planned for the following operations:

Future support is planned for the following operations.
1. Temporal window query
2. Temporal point query (year+month+day+hour+minute+second+millisecond)
3. Point-to-polyline nearest neighbor distance
4. Grid-based indexing for points and polygons
5. Quadtree-based indexing for large-scale point data
6. R-Tree-based indexing for Polygons/Polylines
3. Grid-based indexing for points and polygons
4. R-Tree-based indexing for Polygons/Polylines

## Install from Conda

To install via conda:
```

```shell
conda install -c conda-forge -c rapidsai-nightly cuspatial
```

## Install from Source

To build and install cuSpatial from source:

### Install dependencies
Expand All @@ -46,28 +53,31 @@ environment created in step 3 is active.
1. export `CUSPATIAL_HOME=$(pwd)/cuspatial`
2. clone the cuSpatial repo

```
git clone --recurse-submodules https://github.com/rapidsai/cuspatial.git $CUSPATIAL_HOME
```
```shell
git clone --recurse-submodules https://github.com/rapidsai/cuspatial.git $CUSPATIAL_HOME
```

3. Compile and install
Similar to cuDF (version 0.11), simplely run 'build.sh' diectly under $CUSPATIAL_HOME<br>
Note that a "build" dir is created automatically under $CUSPATIAL_HOME/cpp
3. Compile and install

4. Run C++/Python test code <br>
Similar to cuDF (version 0.20), simply run `build.sh` diectly under `$CUSPATIAL_HOME`.

Some tests using inline data can be run directly, e.g.,
```
$CUSPATIAL_HOME/cpp/build/gtests/LEGACY_HAUSDORFF_TEST
$CUSPATIAL_HOME/cpp/build/gtests/POINT_IN_POLYGON_TEST
python python/cuspatial/cuspatial/tests/legacy/test_hausdorff_distance.py
python python/cuspatial/cuspatial/tests/test_pip.py
```
Note that a "build" dir is created automatically under `$CUSPATIAL_HOME/cpp`.

4. Run C++/Python test code

Some tests using inline data can be run directly, e.g.:

```shell
$CUSPATIAL_HOME/cpp/build/gtests/LEGACY_HAUSDORFF_TEST
$CUSPATIAL_HOME/cpp/build/gtests/POINT_IN_POLYGON_TEST
python python/cuspatial/cuspatial/tests/legacy/test_hausdorff_distance.py
python python/cuspatial/cuspatial/tests/test_pip.py
```

Some other tests involve I/O from data files under $CUSPATIAL_HOME/test_fixtures.
For example, $CUSPATIAL_HOME/cpp/build/gtests/SHAPEFILE_READER_TEST requires three
pre-generated polygon shapefiles that contain 0, 1 and 2 polygons, respectively. They are available at
$CUSPATIAL_HOME/test_fixtures/shapefiles <br>
Some other tests involve I/O from data files under $CUSPATIAL_HOME/test_fixtures.
For example, $CUSPATIAL_HOME/cpp/build/gtests/SHAPEFILE_READER_TEST requires three
pre-generated polygon shapefiles that contain 0, 1 and 2 polygons, respectively. They are available at
$CUSPATIAL_HOME/test_fixtures/shapefiles <br>

**NOTE:** Currently, cuSpatial supports reading point/polyine/polygon data using
Structure of Array (SoA) format and a [shapefile reader](./cpp/src/io/shp)
Expand Down
20 changes: 14 additions & 6 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export CUDA_REL=${CUDA_VERSION%.*}
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30

# Use Ninja to build
# Use Ninja to build, setup conda build dir
export CMAKE_GENERATOR="Ninja"
export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld"

# Switch to project root; also root of repo checkout
cd $WORKSPACE
Expand All @@ -49,6 +50,11 @@ gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

# Remove rapidsai-nightly channel if we are building main branch
if [ "$SOURCE_BRANCH" = "main" ]; then
conda config --system --remove channels rapidsai-nightly
fi

gpuci_logger "Check compiler versions"
python --version
$CC --version
Expand All @@ -69,19 +75,21 @@ conda config --set ssl_verify False
if [ "$BUILD_LIBCUSPATIAL" == '1' ]; then
gpuci_logger "Build conda pkg for libcuspatial"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build conda/recipes/libcuspatial
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuspatial
else
gpuci_conda_retry build --dirty --no-remove-work-dir conda/recipes/libcuspatial
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcuspatial
mkdir -p ${CONDA_BLD_DIR}/libcuspatial/work
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcuspatial/work
fi
fi

if [ "$BUILD_CUSPATIAL" == '1' ]; then
gpuci_logger "Build conda pkg for cuspatial"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build conda/recipes/cuspatial
gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cuspatial
else
gpuci_conda_retry build --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ conda/recipes/cuspatial
gpuci_conda_retry build --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/cuspatial/cpu/.conda-bld/ conda/recipes/cuspatial
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ci/cpu/prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

#Upload cuspatial once per PYTHON
if [[ "$CUDA" == "10.1" ]]; then
if [[ "$CUDA" == "11.0" ]]; then
export UPLOAD_CUSPATIAL=1
else
export UPLOAD_CUSPATIAL=0
Expand Down
8 changes: 4 additions & 4 deletions ci/cpu/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fi
################################################################################

gpuci_logger "Get conda file output locations"
export LIBCUSPATIAL_FILE=`conda build conda/recipes/libcuspatial --output`
export CUSPATIAL_FILE=`conda build conda/recipes/cuspatial --python=$PYTHON --output`
export LIBCUSPATIAL_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuspatial --output`
export CUSPATIAL_FILE=`conda build --croot ${CONDA_BLD_DIR} conda/recipes/cuspatial --python=$PYTHON --output`

################################################################################
# UPLOAD - Conda packages
Expand All @@ -41,7 +41,7 @@ if [[ "$BUILD_LIBCUSPATIAL" == "1" && "$UPLOAD_LIBCUSPATIAL" == "1" ]]; then
test -e ${LIBCUSPATIAL_FILE}
echo "Upload libcuspatial"
echo ${LIBCUSPATIAL_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBCUSPATIAL_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${LIBCUSPATIAL_FILE} --no-progress
fi

if [[ "$BUILD_CUSPATIAL" == "1" && "$UPLOAD_CUSPATIAL" == "1" ]]; then
Expand All @@ -50,5 +50,5 @@ if [[ "$BUILD_CUSPATIAL" == "1" && "$UPLOAD_CUSPATIAL" == "1" ]]; then
test -e ${CUSPATIAL_FILE}
echo "Upload cuspatial"
echo ${CUSPATIAL_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${CUSPATIAL_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${CUSPATIAL_FILE} --no-progress
fi
1 change: 0 additions & 1 deletion ci/docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export HOME=$WORKSPACE
export PROJECT_WORKSPACE=/rapids/cuspatial
export LIBCUDF_KERNEL_CACHE_PATH="$HOME/.jitify-cache"
export NIGHTLY_VERSION=$(echo $BRANCH_VERSION | awk -F. '{print $2}')
export PROJECTS=(cuspatial)

gpuci_logger "Check environment"
Expand Down
5 changes: 3 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CUDA_REL=${CUDA_VERSION%.*}
export CUDF_HOME="${WORKSPACE}/cudf"
export CUSPATIAL_HOME="${WORKSPACE}"
export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/cuspatial/cpu/.conda-bld/

# Set home to the job's workspace
export HOME=$WORKSPACE
Expand Down Expand Up @@ -130,11 +131,11 @@ else

cd $WORKSPACE/python

CONDA_FILE=`find $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ -name "libcuspatial*.tar.bz2"`
CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcuspatial*.tar.bz2"`
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
gpuci_logger "Installing $CONDA_FILE"
conda install -c $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ "$CONDA_FILE"
conda install -c ${CONDA_ARTIFACT_PATH} "$CONDA_FILE"

export LIBCUGRAPH_BUILD_DIR="$WORKSPACE/ci/artifacts/cuspatial/cpu/conda_work/build"

Expand Down
55 changes: 19 additions & 36 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,25 @@
#############################

## Usage
# bash update-version.sh <type>
# where <type> is either `major`, `minor`, `patch`

set -e

# Grab argument for release type
RELEASE_TYPE=$1

# Get current version and calculate next versions
CURRENT_TAG=`git tag | grep -xE 'v[0-9\.]+' | sort --version-sort | tail -n 1 | tr -d 'v'`
CURRENT_MAJOR=`echo $CURRENT_TAG | awk '{split($0, a, "."); print a[1]}'`
CURRENT_MINOR=`echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}'`
CURRENT_PATCH=`echo $CURRENT_TAG | awk '{split($0, a, "."); print a[3]}'`
NEXT_MAJOR=$((CURRENT_MAJOR + 1))
NEXT_MINOR=$((CURRENT_MINOR + 1))
NEXT_PATCH=$((CURRENT_PATCH + 1))
# bash update-version.sh <new_version>


# Format is YY.MM.PP - no leading 'v' or trailing 'a'
NEXT_FULL_TAG=$1

# Get current version
CURRENT_TAG=$(git tag | grep -xE 'v[0-9\.]+' | sort --version-sort | tail -n 1 | tr -d 'v')
CURRENT_MAJOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[1]}')
CURRENT_MINOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}')
CURRENT_PATCH=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[3]}')
CURRENT_SHORT_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR}
NEXT_FULL_TAG=""
NEXT_SHORT_TAG=""

# Determine release type
if [ "$RELEASE_TYPE" == "major" ]; then
NEXT_FULL_TAG="${NEXT_MAJOR}.0.0"
NEXT_SHORT_TAG="${NEXT_MAJOR}.0"
elif [ "$RELEASE_TYPE" == "minor" ]; then
NEXT_FULL_TAG="${CURRENT_MAJOR}.${NEXT_MINOR}.0"
NEXT_SHORT_TAG="${CURRENT_MAJOR}.${NEXT_MINOR}"
elif [ "$RELEASE_TYPE" == "patch" ]; then
NEXT_FULL_TAG="${CURRENT_MAJOR}.${CURRENT_MINOR}.${NEXT_PATCH}"
NEXT_SHORT_TAG="${CURRENT_MAJOR}.${CURRENT_MINOR}"
else
echo "Incorrect release type; use 'major', 'minor', or 'patch' as an argument"
exit 1
fi

echo "Preparing '$RELEASE_TYPE' release [$CURRENT_TAG -> $NEXT_FULL_TAG]"

#Get <major>.<minor> for next version
NEXT_MAJOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[1]}')
NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}')
NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}

echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"

# Inplace sed replace; workaround for Linux and Mac
function sed_runner() {
Expand All @@ -56,4 +39,4 @@ sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/source/conf.
# bump cudf
for FILE in conda/environments/*.yml; do
sed_runner "s/cudf=${CURRENT_SHORT_TAG}/cudf=${NEXT_SHORT_TAG}/g" ${FILE};
done
done
7 changes: 3 additions & 4 deletions conda/environments/cuspatial_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ channels:
- nvidia
- rapidsai-nightly
- conda-forge
- defaults
dependencies:
- clang=8.0.1
- clang-tools=8.0.1
- cudf=0.16.*
- cudf=21.06.*
- cudatoolkit=11.0
- gdal>=3.0.2
- geopandas=0.7.0
- cmake>=3.14
- geopandas>=0.9.0,<0.10.0a0
- cmake>=3.18
- cython>=0.29,<0.30
- gtest
- gmock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ channels:
- nvidia
- rapidsai-nightly
- conda-forge
- defaults
dependencies:
- clang=8.0.1
- clang-tools=8.0.1
- cudf=0.16.*
- cudatoolkit=10.1
- cudf=21.06.*
- cudatoolkit=11.1
- gdal>=3.0.2
- geopandas=0.7.0
- cmake>=3.14
- geopandas>=0.9.0,<0.10.0a0
- cmake>=3.18
- cython>=0.29,<0.30
- gtest
- gmock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ channels:
- nvidia
- rapidsai-nightly
- conda-forge
- defaults
dependencies:
- clang=8.0.1
- clang-tools=8.0.1
- cudf=0.16.*
- cudatoolkit=10.2
- cudf=21.06.*
- cudatoolkit=11.2
- gdal>=3.0.2
- geopandas=0.7.0
- cmake>=3.14
- geopandas>=0.9.0,<0.10.0a0
- cmake>=3.18
- cython>=0.29,<0.30
- gtest
- gmock
4 changes: 4 additions & 0 deletions conda/recipes/cuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ build:
string: py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env:
- VERSION_SUFFIX
- CC
- CXX
- CUDAHOSTCXX

requirements:
build:
Expand All @@ -30,6 +33,7 @@ requirements:
- cudf {{ minor_version }}.*
- rmm {{ minor_version }}.*
- gdal >=3.2.0,<3.3.0a0
- geopandas >=0.9.0,<0.10.0a0

test:
commands:
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/libcuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
{% set cuda_version='.'.join(environ.get('CUDA_VERSION', '9.2').split('.')[:2]) %}
{% set cuda_version='.'.join(environ.get('CUDA', '9.2').split('.')[:2]) %}

package:
name: libcuspatial
version: {{ version }}

source:
path: ../../..
git_url: ../../..

build:
number: {{ GIT_DESCRIBE_NUMBER }}
Expand Down
Loading