From eb33e78b00cf96b68a4738f36dd2c11b0c201c40 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 26 Apr 2023 00:20:52 -0500 Subject: [PATCH 1/9] Test rapids-cmake branch with CCCL updates to 2.1.0. --- fetch_rapids.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index d89046dfa..bd16fa070 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,6 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= +set(rapids-cmake-repo bdice/rapids-cmake) +set(rapids-cmake-branch cccl-update-2.1.0) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.10/RAPIDS.cmake ${CMAKE_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake From 48510b4f65e8afb16503f5afcc69349306992af7 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Thu, 31 Aug 2023 10:51:40 -0700 Subject: [PATCH 2/9] Temporarily remove rmm from conda dependencies so it is fetched by CPM with the appropriate CCCL. --- conda/recipes/libcuspatial/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/recipes/libcuspatial/meta.yaml b/conda/recipes/libcuspatial/meta.yaml index 9833b5d92..01517ef36 100644 --- a/conda/recipes/libcuspatial/meta.yaml +++ b/conda/recipes/libcuspatial/meta.yaml @@ -49,7 +49,7 @@ requirements: - gmock {{ gtest_version }} - gtest {{ gtest_version }} - libcudf ={{ minor_version }} - - librmm ={{ minor_version }} + #- librmm ={{ minor_version }} # TODO: Temporarily disabled so that rmm doesn't provide CCCL - sqlite - proj From af67ddfb49a144ea80ed2de385f0d35482946794 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 11 Sep 2023 17:35:02 -0700 Subject: [PATCH 3/9] Example device function with cuda::proclaim_return_type. --- cpp/include/cuspatial/detail/point_quadtree.cuh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpp/include/cuspatial/detail/point_quadtree.cuh b/cpp/include/cuspatial/detail/point_quadtree.cuh index 3e70d1fe2..ebe9b02e6 100644 --- a/cpp/include/cuspatial/detail/point_quadtree.cuh +++ b/cpp/include/cuspatial/detail/point_quadtree.cuh @@ -30,6 +30,8 @@ #include #include +#include + #include namespace cuspatial { @@ -108,9 +110,9 @@ inline point_quadtree make_quad_tree(rmm::device_uvector& keys, offsets_iter + num_valid_nodes, offsets.begin(), // return is_internal_node ? lhs : rhs - [] __device__(auto const& t) { + cuda::proclaim_return_type([] __device__(auto const& t) { return thrust::get<0>(t) ? thrust::get<1>(t) : thrust::get<2>(t); - }); + })); return std::move(offsets); }(); @@ -126,9 +128,9 @@ inline point_quadtree make_quad_tree(rmm::device_uvector& keys, lengths_iter + num_valid_nodes, lengths.begin(), // return bool ? lhs : rhs - [] __device__(auto const& t) { + cuda::proclaim_return_type([] __device__(auto const& t) { return thrust::get<0>(t) ? thrust::get<1>(t) : thrust::get<2>(t); - }); + })); // Shrink keys to the number of valid nodes keys.resize(num_valid_nodes, stream); From f9d2a041fac6da78dc45fc96d1ee1ce08b376ea5 Mon Sep 17 00:00:00 2001 From: Ray Douglass Date: Fri, 22 Sep 2023 10:20:49 -0400 Subject: [PATCH 4/9] v23.12 Updates [skip ci] --- .github/workflows/build.yaml | 16 ++++---- .github/workflows/pr.yaml | 24 ++++++------ .github/workflows/test.yaml | 8 ++-- README.md | 6 +-- ci/build_docs.sh | 2 +- .../all_cuda-118_arch-x86_64.yaml | 10 ++--- .../all_cuda-120_arch-x86_64.yaml | 10 ++--- cpp/CMakeLists.txt | 2 +- cpp/cuproj/CMakeLists.txt | 2 +- cpp/cuproj/doxygen/Doxyfile | 4 +- cpp/doxygen/Doxyfile | 4 +- dependencies.yaml | 38 +++++++++---------- docs/cuproj/source/conf.py | 4 +- .../user_guide/cuproj_api_examples.ipynb | 4 +- docs/source/conf.py | 4 +- .../user_guide/cuspatial_api_examples.ipynb | 4 +- fetch_rapids.cmake | 2 +- python/cuproj/CMakeLists.txt | 2 +- python/cuproj/cuproj/__init__.py | 2 +- .../cuproj/cuproj/cuprojshim/CMakeLists.txt | 2 +- python/cuproj/pyproject.toml | 6 +-- python/cuspatial/CMakeLists.txt | 2 +- python/cuspatial/cuspatial/__init__.py | 2 +- python/cuspatial/pyproject.toml | 10 ++--- 24 files changed, 85 insertions(+), 85 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bec60c0c4..5a722c4f6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -37,7 +37,7 @@ jobs: python-build: needs: [cpp-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -46,7 +46,7 @@ jobs: upload-conda: needs: [cpp-build, python-build] secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -56,7 +56,7 @@ jobs: if: github.ref_type == 'branch' needs: python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.12 with: arch: "amd64" branch: ${{ inputs.branch }} @@ -68,7 +68,7 @@ jobs: sha: ${{ inputs.sha }} wheel-build-cuspatial: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -78,7 +78,7 @@ jobs: wheel-publish-cuspatial: needs: wheel-build-cuspatial secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -87,7 +87,7 @@ jobs: package-name: cuspatial wheel-build-cuproj: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -97,7 +97,7 @@ jobs: wheel-publish-cuproj: needs: wheel-build-cuproj secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 213950723..5eb7202f6 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -24,40 +24,40 @@ jobs: - wheel-build-cuproj - wheel-tests-cuproj secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.12 checks: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.12 with: enable_check_generated_files: false conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12 with: build_type: pull-request conda-cpp-tests: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.12 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.12 with: build_type: pull-request conda-notebook-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.12 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -67,7 +67,7 @@ jobs: docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.12 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -77,28 +77,28 @@ jobs: wheel-build-cuspatial: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.12 with: build_type: pull-request script: ci/build_wheel_cuspatial.sh wheel-tests-cuspatial: needs: wheel-build-cuspatial secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.12 with: build_type: pull-request script: ci/test_wheel_cuspatial.sh wheel-build-cuproj: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.12 with: build_type: pull-request script: ci/build_wheel_cuproj.sh wheel-tests-cuproj: needs: wheel-build-cuproj secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.12 with: build_type: pull-request script: ci/test_wheel_cuproj.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0fa7f6124..ac7961236 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: conda-cpp-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12 with: build_type: nightly branch: ${{ inputs.branch }} @@ -24,7 +24,7 @@ jobs: sha: ${{ inputs.sha }} conda-python-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.12 with: build_type: nightly branch: ${{ inputs.branch }} @@ -32,7 +32,7 @@ jobs: sha: ${{ inputs.sha }} wheel-tests-cuspatial: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.12 with: build_type: nightly branch: ${{ inputs.branch }} @@ -41,7 +41,7 @@ jobs: script: ci/test_wheel_cuspatial.sh wheel-tests-cuproj: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.12 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/README.md b/README.md index c2fc696ae..b86c71355 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ An example command from the Release Selector: docker run --gpus all --pull always --rm -it \ --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \ -p 8888:8888 -p 8787:8787 -p 8786:8786 \ - nvcr.io/nvidia/rapidsai/notebooks:23.10-cuda11.8-py3.10 + nvcr.io/nvidia/rapidsai/notebooks:23.120-cuda11.8-py3.10 ``` ### Install with Conda @@ -125,7 +125,7 @@ cuSpatial can be installed with conda (miniconda, or the full Anaconda distribut ```shell conda install -c rapidsai -c conda-forge -c nvidia \ - cuspatial=23.10 python=3.10 cudatoolkit=11.8 + cuspatial=23.120 python=3.10 cudatoolkit=11.8 ``` We also provide nightly Conda packages built from the HEAD of our latest development branch. @@ -184,7 +184,7 @@ To build and install cuSpatial from source please see the [build documentation]( If you find cuSpatial useful in your published work, please consider citing the repository. ```bibtex -@misc{cuspatial:23.10, +@misc{cuspatial:23.120, author = {{NVIDIA Corporation}}, title = {cuSpatial: GPU-Accelerated Geospatial and Spatiotemporal Algorithms}, year = {2023}, diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 87991125e..427fb23bc 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -27,7 +27,7 @@ rapids-mamba-retry install \ cuspatial \ cuproj -export RAPIDS_VERSION_NUMBER="23.10" +export RAPIDS_VERSION_NUMBER="23.12" export RAPIDS_DOCS_DIR="$(mktemp -d)" rapids-logger "Build cuSpatial CPP docs" diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 88b40d1cd..e2ca8ea80 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -10,8 +10,8 @@ dependencies: - cmake>=3.26.4 - cuda-version=11.8 - cudatoolkit -- cudf==23.10.* -- cuml==23.10.* +- cudf==23.12.* +- cuml==23.12.* - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 @@ -22,8 +22,8 @@ dependencies: - gtest>=1.13.0 - ipython - ipywidgets -- libcudf==23.10.* -- librmm==23.10.* +- libcudf==23.12.* +- librmm==23.12.* - myst-parser - nbsphinx - ninja @@ -38,7 +38,7 @@ dependencies: - pytest-cov - pytest-xdist - python>=3.9,<3.11 -- rmm==23.10.* +- rmm==23.12.* - scikit-build>=0.13.1 - scikit-image - setuptools diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml index 312191cf9..7976be425 100644 --- a/conda/environments/all_cuda-120_arch-x86_64.yaml +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -13,8 +13,8 @@ dependencies: - cuda-nvcc - cuda-nvrtc-dev - cuda-version=12.0 -- cudf==23.10.* -- cuml==23.10.* +- cudf==23.12.* +- cuml==23.12.* - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 @@ -25,8 +25,8 @@ dependencies: - gtest>=1.13.0 - ipython - ipywidgets -- libcudf==23.10.* -- librmm==23.10.* +- libcudf==23.12.* +- librmm==23.12.* - myst-parser - nbsphinx - ninja @@ -40,7 +40,7 @@ dependencies: - pytest-cov - pytest-xdist - python>=3.9,<3.11 -- rmm==23.10.* +- rmm==23.12.* - scikit-build>=0.13.1 - scikit-image - setuptools diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e35232147..138fdeefb 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -25,7 +25,7 @@ include(rapids-find) rapids_cuda_init_architectures(CUSPATIAL) -project(CUSPATIAL VERSION 23.10.00 LANGUAGES C CXX CUDA) +project(CUSPATIAL VERSION 23.12.00 LANGUAGES C CXX CUDA) # Needed because GoogleBenchmark changes the state of FindThreads.cmake, # causing subsequent runs to have different values for the `Threads::Threads` target. diff --git a/cpp/cuproj/CMakeLists.txt b/cpp/cuproj/CMakeLists.txt index 2f4dadf8a..ef3199f4b 100644 --- a/cpp/cuproj/CMakeLists.txt +++ b/cpp/cuproj/CMakeLists.txt @@ -25,7 +25,7 @@ include(rapids-find) rapids_cuda_init_architectures(CUPROJ) -project(CUPROJ VERSION 23.10.00 LANGUAGES C CXX CUDA) +project(CUPROJ VERSION 23.12.00 LANGUAGES C CXX CUDA) # Needed because GoogleBenchmark changes the state of FindThreads.cmake, # causing subsequent runs to have different values for the `Threads::Threads` target. diff --git a/cpp/cuproj/doxygen/Doxyfile b/cpp/cuproj/doxygen/Doxyfile index 9c7069507..9d5f0fdad 100644 --- a/cpp/cuproj/doxygen/Doxyfile +++ b/cpp/cuproj/doxygen/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = libcuproj # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 23.10.00 +PROJECT_NUMBER = 23.12.00 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -2345,7 +2345,7 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/23.10 "libcudf.tag=https://docs.rapids.ai/api/libcudf/23.10" +TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/23.12 "libcudf.tag=https://docs.rapids.ai/api/libcudf/23.12" # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to diff --git a/cpp/doxygen/Doxyfile b/cpp/doxygen/Doxyfile index 0a37670cf..74f9661c7 100644 --- a/cpp/doxygen/Doxyfile +++ b/cpp/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "libcuspatial" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 23.10.00 +PROJECT_NUMBER = 23.12.00 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -2171,7 +2171,7 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/23.10 "libcudf.tag=https://docs.rapids.ai/api/libcudf/23.10" +TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/23.12 "libcudf.tag=https://docs.rapids.ai/api/libcudf/23.12" # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to diff --git a/dependencies.yaml b/dependencies.yaml index b57f3c2e3..f60a2100c 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -112,8 +112,8 @@ dependencies: - cxx-compiler - gmock>=1.13.0 - gtest>=1.13.0 - - libcudf==23.10.* - - librmm==23.10.* + - libcudf==23.12.* + - librmm==23.12.* - proj - sqlite specific: @@ -158,7 +158,7 @@ dependencies: - cxx-compiler - gmock>=1.13.0 - gtest>=1.13.0 - - librmm==23.10.* + - librmm==23.12.* - proj - sqlite specific: @@ -200,8 +200,8 @@ dependencies: - setuptools - output_types: conda packages: &build_python_packages_conda - - &cudf_conda cudf==23.10.* - - &rmm_conda rmm==23.10.* + - &cudf_conda cudf==23.12.* + - &rmm_conda rmm==23.12.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -224,12 +224,12 @@ dependencies: matrices: - matrix: {cuda: "12.0"} packages: - - cudf-cu12==23.10.* - - rmm-cu12==23.10.* + - cudf-cu12==23.12.* + - rmm-cu12==23.12.* - matrix: {cuda: "11.8"} packages: &build_python_packages_cu11 - - &cudf_cu11 cudf-cu11==23.10.* - - &rmm_cu11 rmm-cu11==23.10.* + - &cudf_cu11 cudf-cu11==23.12.* + - &rmm_cu11 rmm-cu11==23.12.* - {matrix: {cuda: "11.5"}, packages: *build_python_packages_cu11} - {matrix: {cuda: "11.4"}, packages: *build_python_packages_cu11} - {matrix: {cuda: "11.2"}, packages: *build_python_packages_cu11} @@ -266,7 +266,7 @@ dependencies: matrices: - matrix: {cuda: "12.0"} packages: - - rmm-cu12==23.10.* + - rmm-cu12==23.12.* - matrix: {cuda: "11.8"} packages: - *rmm_cu11 @@ -341,17 +341,17 @@ dependencies: - scikit-image - output_types: conda packages: - - &cuml_conda cuml==23.10.* + - &cuml_conda cuml==23.12.* specific: - output_types: [requirements, pyproject] matrices: - {matrix: null, packages: [*cuml_conda]} - matrix: {cuda: "12.0"} packages: - - cuml-cu12==23.10.* + - cuml-cu12==23.12.* - matrix: {cuda: "11.8"} packages: ¬ebooks_packages_cu11 - - &cuml_cu11 cuml-cu11==23.10.* + - &cuml_cu11 cuml-cu11==23.12.* - {matrix: {cuda: "11.5"}, packages: *notebooks_packages_cu11} - {matrix: {cuda: "11.4"}, packages: *notebooks_packages_cu11} - {matrix: {cuda: "11.2"}, packages: *notebooks_packages_cu11} @@ -389,12 +389,12 @@ dependencies: matrices: - matrix: {cuda: "12.0"} packages: - - cudf-cu12==23.10.* - - rmm-cu12==23.10.* + - cudf-cu12==23.12.* + - rmm-cu12==23.12.* - matrix: {cuda: "11.8"} packages: &run_python_cuspatial_packages_cu11 - - cudf-cu11==23.10.* - - rmm-cu11==23.10.* + - cudf-cu11==23.12.* + - rmm-cu11==23.12.* - {matrix: {cuda: "11.5"}, packages: *run_python_cuspatial_packages_cu11} - {matrix: {cuda: "11.4"}, packages: *run_python_cuspatial_packages_cu11} - {matrix: {cuda: "11.2"}, packages: *run_python_cuspatial_packages_cu11} @@ -419,10 +419,10 @@ dependencies: matrices: - matrix: {cuda: "12.0"} packages: - - rmm-cu12==23.10.* + - rmm-cu12==23.12.* - matrix: {cuda: "11.8"} packages: &run_python_cuproj_packages_cu11 - - rmm-cu11==23.10.* + - rmm-cu11==23.12.* - {matrix: {cuda: "11.5"}, packages: *run_python_cuproj_packages_cu11} - {matrix: {cuda: "11.4"}, packages: *run_python_cuproj_packages_cu11} - {matrix: {cuda: "11.2"}, packages: *run_python_cuproj_packages_cu11} diff --git a/docs/cuproj/source/conf.py b/docs/cuproj/source/conf.py index 7d3dcdd53..6d9211c41 100644 --- a/docs/cuproj/source/conf.py +++ b/docs/cuproj/source/conf.py @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '23.10' +version = '23.12' # The full version, including alpha/beta/rc tags. -release = '23.10.00' +release = '23.12.00' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb b/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb index 1a7c25563..c9d11941f 100644 --- a/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb +++ b/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb @@ -45,8 +45,8 @@ "metadata": {}, "outputs": [], "source": [ - "# !conda create -n rapids-23.08 --solver=libmamba -c rapidsai -c conda-forge -c nvidia \\ \n", - "# cuproj=23.08 python=3.10 cuda-version=12.0" + "# !conda create -n rapids-23.12 --solver=libmamba -c rapidsai -c conda-forge -c nvidia \\ \n", + "# cuproj-23.12 python=3.10 cuda-version=12.0" ] }, { diff --git a/docs/source/conf.py b/docs/source/conf.py index 89d88301a..9d92bc2c6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '23.10' +version = '23.12' # The full version, including alpha/beta/rc tags. -release = '23.10.00' +release = '23.12.00' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/user_guide/cuspatial_api_examples.ipynb b/docs/source/user_guide/cuspatial_api_examples.ipynb index b85399729..027428a04 100644 --- a/docs/source/user_guide/cuspatial_api_examples.ipynb +++ b/docs/source/user_guide/cuspatial_api_examples.ipynb @@ -57,8 +57,8 @@ "metadata": {}, "outputs": [], "source": [ - "# !conda create -n rapids-22.08 -c rapidsai -c conda-forge -c nvidia \\ \n", - "# cuspatial=22.08 python=3.9 cudatoolkit=11.5 " + "# !conda create -n rapids-23.12 -c rapidsai -c conda-forge -c nvidia \\ \n", + "# cuspatial=23.12 python=3.9 cudatoolkit=11.5 " ] }, { diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index d89046dfa..dc02bb365 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -12,7 +12,7 @@ # the License. # ============================================================================= if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake) - file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.10/RAPIDS.cmake + file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.12/RAPIDS.cmake ${CMAKE_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake ) endif() diff --git a/python/cuproj/CMakeLists.txt b/python/cuproj/CMakeLists.txt index 771200aad..516dbd323 100644 --- a/python/cuproj/CMakeLists.txt +++ b/python/cuproj/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(cuproj_version 23.10.00) +set(cuproj_version 23.12.00) include(../../fetch_rapids.cmake) include(rapids-cuda) diff --git a/python/cuproj/cuproj/__init__.py b/python/cuproj/cuproj/__init__.py index 3bc512666..1935c1d0f 100644 --- a/python/cuproj/cuproj/__init__.py +++ b/python/cuproj/cuproj/__init__.py @@ -2,4 +2,4 @@ from .transformer import Transformer -__version__ = "23.10.00" +__version__ = "23.12.00" diff --git a/python/cuproj/cuproj/cuprojshim/CMakeLists.txt b/python/cuproj/cuproj/cuprojshim/CMakeLists.txt index 2a63a03fb..dfc229cf2 100644 --- a/python/cuproj/cuproj/cuprojshim/CMakeLists.txt +++ b/python/cuproj/cuproj/cuprojshim/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(cuproj_version 23.10.00) +set(cuproj_version 23.12.00) include(../../../../fetch_rapids.cmake) include(rapids-cmake) diff --git a/python/cuproj/pyproject.toml b/python/cuproj/pyproject.toml index 7a25d921a..191213eaf 100644 --- a/python/cuproj/pyproject.toml +++ b/python/cuproj/pyproject.toml @@ -18,7 +18,7 @@ requires = [ "cmake>=3.26.4", "cython>=0.29,<0.30", "ninja", - "rmm==23.10.*", + "rmm==23.12.*", "scikit-build>=0.13.1", "setuptools", "wheel", @@ -26,7 +26,7 @@ requires = [ [project] name = "cuproj" -version = "23.10.0" +version = "23.12.0" description = "cuProj: GPU-Accelerated Coordinate Projection" readme = { file = "README.md", content-type = "text/markdown" } authors = [{ name = "NVIDIA Corporation" }] @@ -34,7 +34,7 @@ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ "cupy-cuda11x>=12.0.0", - "rmm==23.10.*", + "rmm==23.12.*", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", diff --git a/python/cuspatial/CMakeLists.txt b/python/cuspatial/CMakeLists.txt index 7ef7f58af..2ff126d5a 100644 --- a/python/cuspatial/CMakeLists.txt +++ b/python/cuspatial/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(cuspatial_version 23.10.00) +set(cuspatial_version 23.12.00) include(../../fetch_rapids.cmake) include(rapids-cuda) diff --git a/python/cuspatial/cuspatial/__init__.py b/python/cuspatial/cuspatial/__init__.py index cd11e4950..b9680cf39 100644 --- a/python/cuspatial/cuspatial/__init__.py +++ b/python/cuspatial/cuspatial/__init__.py @@ -29,4 +29,4 @@ ) from .io.geopandas import from_geopandas -__version__ = "23.10.00" +__version__ = "23.12.00" diff --git a/python/cuspatial/pyproject.toml b/python/cuspatial/pyproject.toml index 14db3feae..e3e306bf9 100644 --- a/python/cuspatial/pyproject.toml +++ b/python/cuspatial/pyproject.toml @@ -16,10 +16,10 @@ build-backend = "setuptools.build_meta" requires = [ "cmake>=3.26.4", - "cudf==23.10.*", + "cudf==23.12.*", "cython>=3.0.0", "ninja", - "rmm==23.10.*", + "rmm==23.12.*", "scikit-build>=0.13.1", "setuptools", "wheel", @@ -27,7 +27,7 @@ requires = [ [project] name = "cuspatial" -version = "23.10.0" +version = "23.12.0" description = "cuSpatial: GPU-Accelerated Spatial and Trajectory Data Management and Analytics Library" readme = { file = "README.md", content-type = "text/markdown" } authors = [ @@ -36,9 +36,9 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cudf==23.10.*", + "cudf==23.12.*", "geopandas>=0.11.0", - "rmm==23.10.*", + "rmm==23.12.*", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", From 45492b247e377f6e3b1a54bca9ca1d60ddd1cc6c Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Mon, 25 Sep 2023 23:32:52 +0000 Subject: [PATCH 5/9] Remove unused header. --- cpp/include/cuspatial/column/geometry_column_view.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/include/cuspatial/column/geometry_column_view.hpp b/cpp/include/cuspatial/column/geometry_column_view.hpp index f872c4d37..56845b271 100644 --- a/cpp/include/cuspatial/column/geometry_column_view.hpp +++ b/cpp/include/cuspatial/column/geometry_column_view.hpp @@ -16,7 +16,6 @@ #pragma once -#include #include #include From c8722955752d6aea1af5cd037e6354c1ad804533 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Tue, 26 Sep 2023 04:08:56 +0000 Subject: [PATCH 6/9] Temporary CMake changes to use CCCL 2.1.0 --- cpp/CMakeLists.txt | 1 + cpp/cmake/thirdparty/get_thrust.cmake | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 cpp/cmake/thirdparty/get_thrust.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e35232147..d8afb8dae 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -104,6 +104,7 @@ include(cmake/Modules/ConfigureCUDA.cmake) # add third party dependencies using CPM rapids_cpm_init() # find or add cuDF +include(cmake/thirdparty/get_thrust.cmake) # get thrust directly for now while testing include(cmake/thirdparty/get_cudf.cmake) # find or install GoogleTest if (CUSPATIAL_BUILD_TESTS) diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_thrust.cmake new file mode 100644 index 000000000..e32561d4f --- /dev/null +++ b/cpp/cmake/thirdparty/get_thrust.cmake @@ -0,0 +1,26 @@ +# ============================================================================= +# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# ============================================================================= + +# Use CPM to find or clone thrust +function(find_and_configure_thrust) + + include(${rapids-cmake-dir}/cpm/thrust.cmake) + rapids_cpm_thrust( + NAMESPACE cuspatial + BUILD_EXPORT_SET cuspatial-exports + INSTALL_EXPORT_SET cuspatial-exports) + +endfunction() + +find_and_configure_thrust() From eb24a8715b5dd9e13194a1903bfb6fb0a83c1ecf Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Tue, 26 Sep 2023 04:30:23 +0000 Subject: [PATCH 7/9] proclaim_return_type --- .../detail/index/construction/phase_1.cuh | 11 ++++-- .../detail/join/quadtree_bbox_filtering.cuh | 21 +++++++--- .../quadtree_point_to_nearest_linestring.cuh | 39 +++++++++++-------- cpp/tests/distance/hausdorff_test.cu | 13 +++++-- .../trajectory_distances_and_speeds_test.cu | 6 ++- 5 files changed, 59 insertions(+), 31 deletions(-) diff --git a/cpp/include/cuspatial/detail/index/construction/phase_1.cuh b/cpp/include/cuspatial/detail/index/construction/phase_1.cuh index 83866e01f..14bd89a8f 100644 --- a/cpp/include/cuspatial/detail/index/construction/phase_1.cuh +++ b/cpp/include/cuspatial/detail/index/construction/phase_1.cuh @@ -38,6 +38,8 @@ #include #include +#include + #include #include #include @@ -73,14 +75,14 @@ compute_point_keys_and_sorted_indices(PointIt points_first, points_first, points_last, keys.begin(), - [=] __device__(vec_2d const& point) { + cuda::proclaim_return_type([=] __device__(vec_2d const& point) { if (point.x < min.x || point.x > max.x || point.y < min.y || point.y > max.y) { // If the point is outside the bbox, return a max_level key return static_cast((1 << (2 * max_depth)) - 1); } return cuspatial::detail::utility::z_order(static_cast((point.x - min.x) / scale), static_cast((point.y - min.y) / scale)); - }); + })); rmm::device_uvector indices(keys.size(), stream, mr); @@ -145,7 +147,10 @@ inline std::tuple, std::vector> buil // iterator for the parent level's quad node keys auto parent_keys = thrust::make_transform_iterator( - keys_begin, [] __device__(uint32_t const child_key) { return (child_key >> 2); }); + keys_begin, + cuda::proclaim_return_type( + [] __device__(uint32_t const child_key) { return (child_key >> 2); } + )); // iterator for the current level's quad node point and child counts auto child_nodes = thrust::make_zip_iterator(quad_point_count_begin, quad_child_count_begin); diff --git a/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh b/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh index 9ba8744d0..e4fa9bf70 100644 --- a/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh +++ b/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -47,10 +48,10 @@ join_quadtree_and_bounding_boxes(point_quadtree_ref quadtree, // Count the number of top-level nodes to start. // This could be provided explicitly, but count_if should be fast enough. - auto num_top_level_leaves = thrust::count_if(rmm::exec_policy(stream), - quadtree.level_begin(), - quadtree.level_end(), - thrust::placeholders::_1 == 0); + int32_t num_top_level_leaves = thrust::count_if(rmm::exec_policy(stream), + quadtree.level_begin(), + quadtree.level_end(), + thrust::placeholders::_1 == 0); auto num_pairs = num_top_level_leaves * num_boxes; @@ -89,10 +90,18 @@ join_quadtree_and_bounding_boxes(point_quadtree_ref quadtree, bounding_boxes_first, // The top-level node indices detail::make_counting_transform_iterator( - 0, [=] __device__(auto i) { return i % num_top_level_leaves; }), + 0, + cuda::proclaim_return_type( + [=] __device__(auto i) { return i % num_top_level_leaves; } + ) + ), // The top-level bbox indices detail::make_counting_transform_iterator( - 0, [=] __device__(auto i) { return i / num_top_level_leaves; }), + 0, + cuda::proclaim_return_type( + [=] __device__(auto i) { return i / num_top_level_leaves; } + ) + ), make_current_level_iter(), // intermediate intersections or parent // quadrants found during traversal // found intersecting quadrant and bbox indices for output diff --git a/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh b/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh index bdd0c611e..6a6d09232 100644 --- a/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh +++ b/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -247,7 +248,9 @@ quadtree_point_to_nearest_linestring(LinestringIndexIterator linestring_indices_ auto all_point_indices = thrust::make_transform_iterator(all_point_linestring_indices_and_distances, - [] __device__(auto const& x) { return thrust::get<0>(x); }); + cuda::proclaim_return_type( + [] __device__(auto const& x) { return thrust::get<0>(x); } + )); // Allocate vectors for the distances min reduction auto num_points = std::distance(point_indices_first, point_indices_last); @@ -272,22 +275,24 @@ quadtree_point_to_nearest_linestring(LinestringIndexIterator linestring_indices_ thrust::make_discard_iterator(), output_linestring_idxs.begin(), output_distances.begin()), thrust::equal_to(), // comparator // binop to select the point/linestring pair with the smallest distance - [] __device__(auto const& lhs, auto const& rhs) { - T const& d_lhs = thrust::get<2>(lhs); - T const& d_rhs = thrust::get<2>(rhs); - // If lhs distance is 0, choose rhs - if (d_lhs == T{0}) { return rhs; } - // if rhs distance is 0, choose lhs - if (d_rhs == T{0}) { return lhs; } - // If distances to lhs/rhs are the same, choose linestring with smallest id - if (d_lhs == d_rhs) { - auto const& i_lhs = thrust::get<1>(lhs); - auto const& i_rhs = thrust::get<1>(rhs); - return i_lhs < i_rhs ? lhs : rhs; - } - // Otherwise choose linestring with smallest distance - return d_lhs < d_rhs ? lhs : rhs; - }); + cuda::proclaim_return_type>( + [] __device__(auto const& lhs, auto const& rhs) { + T const& d_lhs = thrust::get<2>(lhs); + T const& d_rhs = thrust::get<2>(rhs); + // If lhs distance is 0, choose rhs + if (d_lhs == T{0}) { return rhs; } + // if rhs distance is 0, choose lhs + if (d_rhs == T{0}) { return lhs; } + // If distances to lhs/rhs are the same, choose linestring with smallest id + if (d_lhs == d_rhs) { + auto const& i_lhs = thrust::get<1>(lhs); + auto const& i_rhs = thrust::get<1>(rhs); + return i_lhs < i_rhs ? lhs : rhs; + } + // Otherwise choose linestring with smallest distance + return d_lhs < d_rhs ? lhs : rhs; + }) + ); auto const num_distances = thrust::distance(point_idxs.begin(), point_idxs_end.first); diff --git a/cpp/tests/distance/hausdorff_test.cu b/cpp/tests/distance/hausdorff_test.cu index 453ee02f3..1b07c4ec9 100644 --- a/cpp/tests/distance/hausdorff_test.cu +++ b/cpp/tests/distance/hausdorff_test.cu @@ -30,6 +30,8 @@ #include #include +#include + #include template @@ -43,7 +45,7 @@ struct HausdorffTest : public ::testing::Test { auto const d_space_offsets = rmm::device_vector{space_offsets}; auto const num_distances = space_offsets.size() * space_offsets.size(); - auto distances = rmm::device_vector{num_distances}; + auto distances = rmm::device_vector(num_distances); auto const distances_end = cuspatial::directed_hausdorff_distance(d_points.begin(), d_points.end(), @@ -150,10 +152,13 @@ void generic_hausdorff_test() auto zero_iter = thrust::make_constant_iterator({0, 0}); auto counting_iter = thrust::make_counting_iterator(0); auto space_offset_iter = thrust::make_transform_iterator( - counting_iter, [] __device__(auto idx) { return idx * elements_per_space; }); + counting_iter, + cuda::proclaim_return_type( + [] __device__(auto idx) { return idx * elements_per_space; } + )); - auto distances = rmm::device_vector{num_distances}; - auto expected = rmm::device_vector{num_distances, 0}; + auto distances = rmm::device_vector(num_distances); + auto expected = rmm::device_vector(num_distances, 0); auto distances_end = cuspatial::directed_hausdorff_distance(zero_iter, zero_iter + num_points, diff --git a/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu b/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu index 666b3c20b..111bf9e56 100644 --- a/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu +++ b/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu @@ -29,6 +29,8 @@ #include #include +#include + #include #include @@ -66,7 +68,9 @@ struct TrajectoryDistancesAndSpeedsTest : public ::testing::Test { thrust::reduce(expected_speeds.begin(), expected_speeds.end(), std::numeric_limits::lowest(), - [] __device__(T const& a, T const& b) { return max(abs(a), abs(b)); }); + cuda::proclaim_return_type( + [] __device__(T const& a, T const& b) { return max(abs(a), abs(b)); } + )); // We expect the floating point error (in ulps) due to be proportional to the number of // operations to compute the relevant quantity. For distance, this computation is From 85be73977f209fbafde08c59e703f0a61c5a76a0 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Tue, 26 Sep 2023 04:30:42 +0000 Subject: [PATCH 8/9] Use () init for size/range ctors, not {} init --- cpp/include/cuspatial_test/vector_factories.cuh | 4 +++- cpp/tests/distance/haversine_test.cu | 4 ++-- cpp/tests/distance/linestring_distance_test.cu | 4 ++-- cpp/tests/trajectory/trajectory_test_utils.cuh | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cpp/include/cuspatial_test/vector_factories.cuh b/cpp/include/cuspatial_test/vector_factories.cuh index cbf1d8f56..38de807b0 100644 --- a/cpp/include/cuspatial_test/vector_factories.cuh +++ b/cpp/include/cuspatial_test/vector_factories.cuh @@ -68,10 +68,12 @@ auto make_device_uvector(std::initializer_list inl, return res; } +// TODO: this can be eliminated when Thrust 2.1.0 is the minimum because +// thrust::host_vector has a constructor that takes an initializer_list template auto make_host_vector(std::initializer_list inl) { - return thrust::host_vector{inl.begin(), inl.end()}; + return thrust::host_vector(inl.begin(), inl.end()); } /** diff --git a/cpp/tests/distance/haversine_test.cu b/cpp/tests/distance/haversine_test.cu index b0798a37d..3af600876 100644 --- a/cpp/tests/distance/haversine_test.cu +++ b/cpp/tests/distance/haversine_test.cu @@ -59,8 +59,8 @@ TYPED_TEST(HaversineTest, Zero) auto a_lonlat = rmm::device_vector(1, Location{0, 0}); auto b_lonlat = rmm::device_vector(1, Location{0, 0}); - auto distance = rmm::device_vector{1, -1}; - auto expected = rmm::device_vector{1, 0}; + auto distance = rmm::device_vector(1, -1); + auto expected = rmm::device_vector(1, 0); auto distance_end = cuspatial::haversine_distance( a_lonlat.begin(), a_lonlat.end(), b_lonlat.begin(), distance.begin()); diff --git a/cpp/tests/distance/linestring_distance_test.cu b/cpp/tests/distance/linestring_distance_test.cu index cb9836392..0748d9c59 100644 --- a/cpp/tests/distance/linestring_distance_test.cu +++ b/cpp/tests/distance/linestring_distance_test.cu @@ -209,8 +209,8 @@ TYPED_TEST(PairwiseLinestringDistanceTest, FromLongInputs) auto offset = rmm::device_vector{std::vector{0, 100, 200, 300, 400, num_points}}; - auto got = rmm::device_vector{num_pairs}; - auto expected = rmm::device_vector{std::vector{42.0, 42.0, 42.0, 42.0, 42.0}}; + auto got = rmm::device_vector(num_pairs); + auto expected = rmm::device_vector{{42.0, 42.0, 42.0, 42.0, 42.0}}; auto mlinestrings1 = make_multilinestring_range(num_pairs, thrust::make_counting_iterator(0), diff --git a/cpp/tests/trajectory/trajectory_test_utils.cuh b/cpp/tests/trajectory/trajectory_test_utils.cuh index 679674674..847748fc6 100644 --- a/cpp/tests/trajectory/trajectory_test_utils.cuh +++ b/cpp/tests/trajectory/trajectory_test_utils.cuh @@ -296,7 +296,7 @@ struct trajectory_test_data { auto id_and_position = thrust::make_zip_iterator(ids_sorted.begin(), points_sorted.begin()); - auto distance_per_step = rmm::device_vector{points.size()}; + auto distance_per_step = rmm::device_vector(points.size()); thrust::transform(rmm::exec_policy(), id_and_position, From dcdb388cac89ea5a315103df8e317c44c56acc06 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Tue, 26 Sep 2023 04:53:09 +0000 Subject: [PATCH 9/9] clang-format --- .../detail/index/construction/phase_1.cuh | 7 +++---- .../detail/join/quadtree_bbox_filtering.cuh | 16 ++++++---------- .../quadtree_point_to_nearest_linestring.cuh | 6 ++---- cpp/tests/distance/hausdorff_test.cu | 7 +++---- .../trajectory_distances_and_speeds_test.cu | 3 +-- 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/cpp/include/cuspatial/detail/index/construction/phase_1.cuh b/cpp/include/cuspatial/detail/index/construction/phase_1.cuh index 14bd89a8f..b06dbc6bb 100644 --- a/cpp/include/cuspatial/detail/index/construction/phase_1.cuh +++ b/cpp/include/cuspatial/detail/index/construction/phase_1.cuh @@ -147,10 +147,9 @@ inline std::tuple, std::vector> buil // iterator for the parent level's quad node keys auto parent_keys = thrust::make_transform_iterator( - keys_begin, - cuda::proclaim_return_type( - [] __device__(uint32_t const child_key) { return (child_key >> 2); } - )); + keys_begin, cuda::proclaim_return_type([] __device__(uint32_t const child_key) { + return (child_key >> 2); + })); // iterator for the current level's quad node point and child counts auto child_nodes = thrust::make_zip_iterator(quad_point_count_begin, quad_child_count_begin); diff --git a/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh b/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh index e4fa9bf70..31cc7e849 100644 --- a/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh +++ b/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh @@ -90,18 +90,14 @@ join_quadtree_and_bounding_boxes(point_quadtree_ref quadtree, bounding_boxes_first, // The top-level node indices detail::make_counting_transform_iterator( - 0, - cuda::proclaim_return_type( - [=] __device__(auto i) { return i % num_top_level_leaves; } - ) - ), + 0, cuda::proclaim_return_type([=] __device__(auto i) { + return i % num_top_level_leaves; + })), // The top-level bbox indices detail::make_counting_transform_iterator( - 0, - cuda::proclaim_return_type( - [=] __device__(auto i) { return i / num_top_level_leaves; } - ) - ), + 0, cuda::proclaim_return_type([=] __device__(auto i) { + return i / num_top_level_leaves; + })), make_current_level_iter(), // intermediate intersections or parent // quadrants found during traversal // found intersecting quadrant and bbox indices for output diff --git a/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh b/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh index 6a6d09232..563c83e86 100644 --- a/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh +++ b/cpp/include/cuspatial/detail/join/quadtree_point_to_nearest_linestring.cuh @@ -249,8 +249,7 @@ quadtree_point_to_nearest_linestring(LinestringIndexIterator linestring_indices_ auto all_point_indices = thrust::make_transform_iterator(all_point_linestring_indices_and_distances, cuda::proclaim_return_type( - [] __device__(auto const& x) { return thrust::get<0>(x); } - )); + [] __device__(auto const& x) { return thrust::get<0>(x); })); // Allocate vectors for the distances min reduction auto num_points = std::distance(point_indices_first, point_indices_last); @@ -291,8 +290,7 @@ quadtree_point_to_nearest_linestring(LinestringIndexIterator linestring_indices_ } // Otherwise choose linestring with smallest distance return d_lhs < d_rhs ? lhs : rhs; - }) - ); + })); auto const num_distances = thrust::distance(point_idxs.begin(), point_idxs_end.first); diff --git a/cpp/tests/distance/hausdorff_test.cu b/cpp/tests/distance/hausdorff_test.cu index 1b07c4ec9..6ef18341f 100644 --- a/cpp/tests/distance/hausdorff_test.cu +++ b/cpp/tests/distance/hausdorff_test.cu @@ -152,10 +152,9 @@ void generic_hausdorff_test() auto zero_iter = thrust::make_constant_iterator({0, 0}); auto counting_iter = thrust::make_counting_iterator(0); auto space_offset_iter = thrust::make_transform_iterator( - counting_iter, - cuda::proclaim_return_type( - [] __device__(auto idx) { return idx * elements_per_space; } - )); + counting_iter, cuda::proclaim_return_type([] __device__(auto idx) { + return idx * elements_per_space; + })); auto distances = rmm::device_vector(num_distances); auto expected = rmm::device_vector(num_distances, 0); diff --git a/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu b/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu index 111bf9e56..819dae901 100644 --- a/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu +++ b/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu @@ -69,8 +69,7 @@ struct TrajectoryDistancesAndSpeedsTest : public ::testing::Test { expected_speeds.end(), std::numeric_limits::lowest(), cuda::proclaim_return_type( - [] __device__(T const& a, T const& b) { return max(abs(a), abs(b)); } - )); + [] __device__(T const& a, T const& b) { return max(abs(a), abs(b)); })); // We expect the floating point error (in ulps) due to be proportional to the number of // operations to compute the relevant quantity. For distance, this computation is