Skip to content

Commit

Permalink
Merge pull request #311 from rapidsai/branch-0.16
Browse files Browse the repository at this point in the history
[RELEASE] cuspatial v0.16
  • Loading branch information
raydouglass authored Oct 21, 2020
2 parents c5b7527 + c337b32 commit 2d7e7d7
Show file tree
Hide file tree
Showing 94 changed files with 2,235 additions and 388 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# cuSpatial 0.16.0 (21 Oct 2020)

## New Features
- PR #290 Add Java bindings and a cuSpatial JAR package for Java users.

## Improvements
- PR #278 Update googlebenchmark version to match rmm & cudf.
- PR #286 Upgrade Thrust to latest commit.
- PR #287 Replace RMM get_default_resource with get_current_device_resource.
- PR #289 Fix cmake warnings for GoogleTest amd GoogleBenchmark external projects.
- PR #292 Update include paths to libcudf test utilities.
- PR #295 Use move from libcpp.utility.
- PR #299 Update ci/local/README.md
- PR #303 Update yml files to include CUDA 11.0 and remove old supported versions

## Bug Fixes
- PR #291 Fix mislabeled columns in Python spatial join result table.
- PR #294 Fix include of deprecated RMM header file.
- PR #296 Updates for RMM being header only.
- PR #298 Fix Python docs to render first argument of each public function.


# cuSpatial 0.15.0 (26 Aug 2020)

## New Features
Expand Down Expand Up @@ -92,7 +114,7 @@

## New Features

- PR #126 Create and build cuSpatial Docs
- PR #126 Create and build cuSpatial Docs
- PR #130 Add cubic spline fit and interpolation

## Improvements
Expand Down
10 changes: 5 additions & 5 deletions ci/local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ Build and test your local repository using a base gpuCI Docker image
where:
-H Show this help text
-r Path to repository (defaults to working directory)
-i Use Docker image (default is gpuci/rapidsai-base:cuda10.0-ubuntu16.04-gcc5-py3.6)
-i Use Docker image (default is gpuci/rapidsai:${NIGHTLY_VERSION}-cuda10.1-devel-ubuntu16.04-py3.7)
-s Skip building and testing and start an interactive shell in a container of the Docker image
```

Example Usage:
`bash build.sh -r ~/rapids/cuspatial -i gpuci/rapidsai-base:cuda10.1-ubuntu16.04-gcc5-py3.6`
`bash build.sh -r ~/rapids/cuspatial -i gpuci/rapidsai:0.16-cuda10.2-devel-ubuntu16.04-py3.7`

For a full list of available gpuCI docker images, visit our [DockerHub](https://hub.docker.com/r/gpuci/rapidsai-base/tags) page.
For a full list of available gpuCI docker images, visit our [DockerHub](https://hub.docker.com/r/gpuci/rapidsai/tags) page.

Style Check:
```bash
$ bash ci/local/build.sh -r ~/rapids/cuspatial -s
$ source activate gdf #Activate gpuCI conda environment
$ source activate rapids # Activate gpuCI conda environment
$ cd rapids
$ flake8 python
```
Expand All @@ -42,7 +42,7 @@ There are some caveats to be aware of when using this script, especially if you

### Docker Image Build Repository

The docker image will generate build artifacts in a folder on your machine located in the `root` directory of the repository you passed to the script. For the above example, the directory is named `~/rapids/cuspatial/build_rapidsai-base_cuda10.1-ubuntu16.04-gcc5-py3.6/`. Feel free to remove this directory after the script is finished.
The docker image will generate build artifacts in a folder on your machine located in the `root` directory of the repository you passed to the script. For the above example, the directory is named `~/rapids/cuspatial/build_rapidsai_cuda10.1-ubuntu16.04-py3.7/`. Feel free to remove this directory after the script is finished.

*Note*: The script *will not* override your local build repository. Your local environment stays in tact.

Expand Down
4 changes: 3 additions & 1 deletion conda/environments/cuspatial_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ channels:
dependencies:
- clang=8.0.1
- clang-tools=8.0.1
- cudf=0.15.*
- cudf=0.16.*
- cudatoolkit=10.1
- gdal>=3.0.2
- geopandas=0.7.0
- cmake>=3.14
- cython>=0.29,<0.30
4 changes: 3 additions & 1 deletion conda/environments/cuspatial_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ channels:
dependencies:
- clang=8.0.1
- clang-tools=8.0.1
- cudf=0.15.*
- cudf=0.16.*
- cudatoolkit=10.2
- gdal>=3.0.2
- geopandas=0.7.0
- cmake>=3.14
- cython>=0.29,<0.30
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ channels:
dependencies:
- clang=8.0.1
- clang-tools=8.0.1
- cudf=0.15.*
- cudatoolkit=10.0
- cudf=0.16.*
- cudatoolkit=11.0
- gdal>=3.0.2
- geopandas=0.7.0
- cmake>=3.14
- cython>=0.29,<0.30
14 changes: 0 additions & 14 deletions conda/environments/cuspatial_dev_cuda9.2.yml

This file was deleted.

3 changes: 2 additions & 1 deletion conda/recipes/cuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ requirements:
- cython >=0.29,<0.30
- setuptools
- cudf {{ minor_version }}.*
- rmm {{ minor_version }}.*
- libcuspatial {{ version }}.*

run:
- python
- cudf {{ minor_version }}.*
- rmm {{ minor_version }}.*
- gdal >=3.0.2,<3.1.0a0

test:
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/libcuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ requirements:
- cmake >=3.12.4
host:
- libcudf {{ minor_version }}.*
- librmm {{ minor_version }}.*
- cudatoolkit {{ cuda_version }}.*
- gdal >=3.0.2,<3.1.0a0
run:
Expand Down
30 changes: 3 additions & 27 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#=============================================================================
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(CUDA_SPATIAL VERSION 0.15.0 LANGUAGES C CXX CUDA)
project(CUDA_SPATIAL VERSION 0.16.0 LANGUAGES C CXX CUDA)

if(NOT CMAKE_CUDA_COMPILER)
message(SEND_ERROR "CMake cannot locate a CUDA compiler")
Expand Down Expand Up @@ -53,15 +53,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Suppress parentheses warning which causes gmock to fail
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -Wno-parentheses")

option(CMAKE_CXX11_ABI "Enable the GLIBCXX11 ABI" ON)
if(CMAKE_CXX11_ABI)
message(STATUS "CUSPATIAL: Enabling the GLIBCXX11 ABI")
else()
message(STATUS "CUSPATIAL: Disabling the GLIBCXX11 ABI")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -D_GLIBCXX_USE_CXX11_ABI=0")
endif(CMAKE_CXX11_ABI)
endif(CMAKE_COMPILER_IS_GNUCXX)

if(CMAKE_CUDA_COMPILER_VERSION)
Expand Down Expand Up @@ -183,18 +174,9 @@ endif("$ENV{CONDA_BUILD}" STREQUAL "1")
find_path(RMM_INCLUDE "rmm"
HINTS "$ENV{RMM_ROOT}/include")

find_library(RMM_LIBRARY "rmm"
HINTS "$ENV{RMM_ROOT}/lib")

message(STATUS "RMM: RMM_ROOT set to $ENV{RMM_ROOT}")
message(STATUS "RMM: RMM_LIBRARY set to ${RMM_LIBRARY}")
message(STATUS "RMM: RMM_INCLUDE set to ${RMM_INCLUDE}")

add_library(rmm SHARED IMPORTED ${RMM_LIBRARY})
if (RMM_INCLUDE AND RMM_LIBRARY)
set_target_properties(rmm PROPERTIES IMPORTED_LOCATION ${RMM_LIBRARY})
endif (RMM_INCLUDE AND RMM_LIBRARY)

# - CUDF -------------------------------------------------------------------------------------------

find_path(CUDF_INCLUDE "cudf"
Expand All @@ -203,15 +185,11 @@ find_path(CUDF_INCLUDE "cudf"
find_library(CUDF_LIBRARY "cudf"
HINTS "$ENV{CUDF_ROOT}/lib")

set(CUDF_TEST_INCLUDE "$ENV{CUDF_HOME}/cpp")

message(STATUS "CUDF: CUDF_HOME set to $ENV{CUDF_HOME}")
message(STATUS "CUDF: CUDF_LIBRARY set to ${CUDF_LIBRARY}")
message(STATUS "CUDF: CUDF_INCLUDE set to ${CUDF_INCLUDE}")
message(STATUS "CUDF: CUB_INCLUDE_DIR set to ${CUB_INCLUDE_DIR}")
message(STATUS "CUDF: THRUST_INCLUDE_DIR set to ${THRUST_INCLUDE_DIR}")
message(STATUS "CUDF: LIBCUDACXX_INCLUDE_DIR set to ${LIBCUDACXX_INCLUDE_DIR}")
message(STATUS "CUDF: CUDF_TEST_INCLUDE set to ${CUDF_TEST_INCLUDE}")

add_library(cudf SHARED IMPORTED ${CUDF_LIBRARY})
if (CUDF_INCLUDE AND CUDF_LIBRARY)
Expand Down Expand Up @@ -266,8 +244,7 @@ endif(BUILD_BENCHMARKS)
###################################################################################################
# - include paths ---------------------------------------------------------------------------------

include_directories("${CUB_INCLUDE_DIR}"
"${THRUST_INCLUDE_DIR}"
include_directories("${THRUST_INCLUDE_DIR}"
"${LIBCUDACXX_INCLUDE_DIR}")

if(CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES)
Expand All @@ -293,7 +270,6 @@ link_directories("${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}" # CMAKE_CUDA_IMPLICIT
"${FLATBUFFERS_LIBRARY_DIR}"
"${GDAL_LIBRARIES}"
"${GTEST_LIBRARY_DIR}"
"${RMM_LIBRARY}"
"${CUDF_LIBRARY}")

if(CONDA_LINK_DIRS)
Expand Down Expand Up @@ -340,7 +316,7 @@ endif(USE_NVTX)
###################################################################################################
# - link libraries --------------------------------------------------------------------------------

target_link_libraries(cuspatial cudf rmm cudart cuda cusparse nvrtc GDAL::GDAL)
target_link_libraries(cuspatial cudf cudart cuda cusparse nvrtc GDAL::GDAL)


###################################################################################################
Expand Down
12 changes: 4 additions & 8 deletions cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ find_library(CUDFTESTUTIL_LIBRARY "libcudftestutil.a"
HINTS "$ENV{CUDF_ROOT}/lib")

message(STATUS "CUDFTESTUTIL: CUDFTESTUTIL_LIBRARY set to ${CUDFTESTUTIL_LIBRARY}")
message(STATUS "CUDFTESTUTIL: CUDF_TEST_INCLUDE set to ${CUDF_TEST_INCLUDE}")

add_library(cudftestutil STATIC IMPORTED ${CUDFTESTUTIL_LIBRARY})
if (CUDF_TEST_INCLUDE AND CUDFTESTUTIL_LIBRARY)
if (CUDFTESTUTIL_LIBRARY)
set_target_properties(cudftestutil PROPERTIES IMPORTED_LOCATION ${CUDFTESTUTIL_LIBRARY})
endif (CUDF_TEST_INCLUDE AND CUDFTESTUTIL_LIBRARY)
endif (CUDFTESTUTIL_LIBRARY)

###################################################################################################
# - compiler function -----------------------------------------------------------------------------
Expand All @@ -29,7 +28,7 @@ function(ConfigureBench CMAKE_BENCH_NAME CMAKE_BENCH_SRC)
"${CMAKE_CURRENT_SOURCE_DIR}/synchronization/synchronization.cpp")
set_target_properties(${CMAKE_BENCH_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(${CMAKE_BENCH_NAME} benchmark benchmark_main pthread cuspatial cudf
cudftestutil rmm cudart cuda "${ARROW_LIB}" ${ZLIB_LIBRARIES}
cudftestutil cudart cuda "${ARROW_LIB}" ${ZLIB_LIBRARIES}
nvrtc GDAL::GDAL)
set_target_properties(${CMAKE_BENCH_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/gbenchmarks")
Expand All @@ -38,8 +37,7 @@ endfunction(ConfigureBench)
###################################################################################################
# - include paths ---------------------------------------------------------------------------------

include_directories("${CUB_INCLUDE_DIR}"
"${THRUST_INCLUDE_DIR}"
include_directories("${THRUST_INCLUDE_DIR}"
"${LIBCUDACXX_INCLUDE_DIR}")

include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}"
Expand All @@ -52,7 +50,6 @@ include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}"
"${GBENCH_INCLUDE_DIR}"
"${RMM_INCLUDE}"
"${CUDF_INCLUDE}"
"${CUDF_TEST_INCLUDE}"
"${CMAKE_CURRENT_SOURCE_DIR}")

###################################################################################################
Expand All @@ -65,7 +62,6 @@ link_directories("${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}" # CMAKE_CUDA_IMPLICIT
"${CONDA_LINK_DIRS}"
"${GTEST_LIBRARY_DIR}"
"${GBENCH_LIBRARY_DIR}"
"${RMM_LIBRARY}"
"${CUDF_LIBRARY}"
"${CUSPATIAL_LIBRARY}")

Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/hausdorff_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <benchmarks/fixture/benchmark_fixture.hpp>
#include <benchmarks/synchronization/synchronization.hpp>

#include <tests/utilities/column_wrapper.hpp>
#include <cudf_test/column_wrapper.hpp>

#include <thrust/iterator/constant_iterator.h>

Expand Down
3 changes: 1 addition & 2 deletions cpp/cmake/Modules/ConfigureGoogleBenchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ elseif(CMAKE_CXX11_ABI)
list(APPEND GBENCH_CMAKE_ARGS " -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=1")
endif(NOT CMAKE_CXX11_ABI)

configure_file("${CMAKE_SOURCE_DIR}/cmake/Templates/GoogleBenchmark.CMakeLists.txt.cmake"
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Templates/GoogleBenchmark.CMakeLists.txt.cmake"
"${GBENCH_ROOT}/CMakeLists.txt")

file(MAKE_DIRECTORY "${GBENCH_ROOT}/build")
Expand Down Expand Up @@ -56,4 +56,3 @@ message(STATUS "Google Benchmark installed here: " ${GBENCH_ROOT}/install)
set(GBENCH_INCLUDE_DIR "${GBENCH_ROOT}/install/include")
set(GBENCH_LIBRARY_DIR "${GBENCH_ROOT}/install/lib" "${GBENCH_ROOT}/install/lib64")
set(GBENCH_FOUND TRUE)

3 changes: 1 addition & 2 deletions cpp/cmake/Modules/ConfigureGoogleTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ elseif(CMAKE_CXX11_ABI)
list(APPEND GTEST_CMAKE_ARGS " -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=1")
endif(NOT CMAKE_CXX11_ABI)

configure_file("${CMAKE_SOURCE_DIR}/cmake/Templates/GoogleTest.CMakeLists.txt.cmake"
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Templates/GoogleTest.CMakeLists.txt.cmake"
"${GTEST_ROOT}/CMakeLists.txt")

file(MAKE_DIRECTORY "${GTEST_ROOT}/build")
Expand Down Expand Up @@ -56,4 +56,3 @@ message(STATUS "GoogleTest installed here: " ${GTEST_ROOT}/install)
set(GTEST_INCLUDE_DIR "${GTEST_ROOT}/install/include")
set(GTEST_LIBRARY_DIR "${GTEST_ROOT}/install/lib")
set(GTEST_FOUND TRUE)

10 changes: 2 additions & 8 deletions cpp/cmake/Templates/GoogleBenchmark.CMakeLists.txt.cmake
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
cmake_minimum_required(VERSION 3.12)
project(cuspatial-GoogleBenchmark)

include(ExternalProject)

ExternalProject_Add(GoogleBenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG master
GIT_TAG v1.5.1
SOURCE_DIR "${GBENCH_ROOT}/googlebenchmark"
BINARY_DIR "${GBENCH_ROOT}/build"
INSTALL_DIR "${GBENCH_ROOT}/install"
CMAKE_ARGS ${GBENCH_CMAKE_ARGS} -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${GBENCH_ROOT}/install)
# The flag BENCHMARK_ENABLE_TESTING=OFF prevents Google Benchmark from asking for Google Test.







9 changes: 1 addition & 8 deletions cpp/cmake/Templates/GoogleTest.CMakeLists.txt.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.12)
project(cuspatial-GoogleTest)

include(ExternalProject)

Expand All @@ -9,11 +10,3 @@ ExternalProject_Add(GoogleTest
BINARY_DIR "${GTEST_ROOT}/build"
INSTALL_DIR "${GTEST_ROOT}/install"
CMAKE_ARGS ${GTEST_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${GTEST_ROOT}/install)








29 changes: 3 additions & 26 deletions cpp/cmake/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
include(FetchContent)

###################################################################################################
# - cub -------------------------------------------------------------------------------------------

message("Fetching CUB")

FetchContent_Declare(
cub
GIT_REPOSITORY https://github.com/thrust/cub.git
GIT_TAG 1.9.10
GIT_SHALLOW true
# TODO(rongou): remove this after upgrading to new CUB release.
PATCH_COMMAND
COMMAND sed -i "494 a histogram_sweep_config.template Init<typename Policy110::HistogramSweepPolicy>()$<SEMICOLON>" cub/device/dispatch/dispatch_histogram.cuh
)

FetchContent_GetProperties(cub)
if(NOT cub_POPULATED)
FetchContent_Populate(cub)
# We are not using the cub CMake targets, so no need to call `add_subdirectory()`.
endif()
set(CUB_INCLUDE_DIR "${cub_SOURCE_DIR}" PARENT_SCOPE)

###################################################################################################
# - thrust ----------------------------------------------------------------------------------------
# - thrust/cub ------------------------------------------------------------------------------------

message("Fetching Thrust")

FetchContent_Declare(
thrust
GIT_REPOSITORY https://github.com/thrust/thrust.git
GIT_TAG 1.9.10
GIT_SHALLOW true
PATCH_COMMAND COMMAND patch -p1 < "${CMAKE_CURRENT_SOURCE_DIR}/thrust-ret-if-fail.patch"
# August 28, 2020
GIT_TAG 52a8bda46c5c2128414d1d47f546b486ff0be2f0
)

FetchContent_GetProperties(thrust)
Expand Down
Loading

0 comments on commit 2d7e7d7

Please sign in to comment.