diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json index 281859a2d..9c0493cec 100644 --- a/.devcontainer/cuda11.8-conda/devcontainer.json +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -5,12 +5,12 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "conda", - "BASE": "rapidsai/devcontainers:24.04-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.06-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.4": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json index 6212c3bb1..b141d92c6 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -5,12 +5,12 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "pip", - "BASE": "rapidsai/devcontainers:24.04-cpp-llvm16-cuda11.8-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.06-cpp-cuda11.8-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.4": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda12.0-conda/devcontainer.json b/.devcontainer/cuda12.2-conda/devcontainer.json similarity index 88% rename from .devcontainer/cuda12.0-conda/devcontainer.json rename to .devcontainer/cuda12.2-conda/devcontainer.json index 91bc3e4e7..30da7f9b5 100644 --- a/.devcontainer/cuda12.0-conda/devcontainer.json +++ b/.devcontainer/cuda12.2-conda/devcontainer.json @@ -3,19 +3,19 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "12.2", "PYTHON_PACKAGE_MANAGER": "conda", - "BASE": "rapidsai/devcontainers:24.04-cpp-mambaforge-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.4": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" ], - "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.0-envs}"], + "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.2-envs}"], "postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], "workspaceFolder": "/home/coder", "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuspatial,type=bind,consistency=consistent", @@ -24,7 +24,7 @@ "source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent", - "source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.0-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.2-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" ], "customizations": { "vscode": { diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.2-pip/devcontainer.json similarity index 87% rename from .devcontainer/cuda12.0-pip/devcontainer.json rename to .devcontainer/cuda12.2-pip/devcontainer.json index 0d38b1012..90959ecac 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.2-pip/devcontainer.json @@ -3,19 +3,19 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "12.2", "PYTHON_PACKAGE_MANAGER": "pip", - "BASE": "rapidsai/devcontainers:24.04-cpp-llvm16-cuda12.0-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.06-cpp-cuda12.2-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.4": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" ], - "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs}"], + "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.2-venvs}"], "postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], "workspaceFolder": "/home/coder", "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuspatial,type=bind,consistency=consistent", @@ -23,7 +23,7 @@ "source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", - "source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.2-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" ], "customizations": { "vscode": { diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ba2bf3bc8..06cb83f7d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.06 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-workflows/.github/workflows/conda-python-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.06 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-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.06 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-workflows/.github/workflows/custom-job.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.06 with: arch: "amd64" branch: ${{ inputs.branch }} @@ -68,7 +68,7 @@ jobs: sha: ${{ inputs.sha }} wheel-build-cuspatial: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.06 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-workflows/.github/workflows/wheels-publish.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.06 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-workflows/.github/workflows/wheels-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.06 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-workflows/.github/workflows/wheels-publish.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.06 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 96fcdcdd3..be33cfd04 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -25,40 +25,40 @@ jobs: - wheel-tests-cuproj - devcontainer secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.06 checks: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.06 with: enable_check_generated_files: false conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.06 with: build_type: pull-request conda-cpp-tests: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.06 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.06 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.06 with: build_type: pull-request conda-notebook-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.06 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -68,7 +68,7 @@ jobs: docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.06 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -78,35 +78,37 @@ jobs: wheel-build-cuspatial: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.06 with: build_type: pull-request script: ci/build_wheel_cuspatial.sh wheel-tests-cuspatial: needs: wheel-build-cuspatial secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.06 with: build_type: pull-request script: ci/test_wheel_cuspatial.sh wheel-build-cuproj: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.06 with: build_type: pull-request script: ci/build_wheel_cuproj.sh wheel-tests-cuproj: needs: [wheel-build-cuspatial, wheel-build-cuproj] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.06 with: build_type: pull-request script: ci/test_wheel_cuproj.sh devcontainer: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.06 with: + arch: '["amd64"]' + cuda: '["12.2"]' build_command: | sccache -z; build-all -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON --verbose; diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2adba7b3b..00312c6a0 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-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.06 with: build_type: nightly branch: ${{ inputs.branch }} @@ -24,7 +24,7 @@ jobs: sha: ${{ inputs.sha }} conda-python-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.06 with: build_type: nightly branch: ${{ inputs.branch }} @@ -32,7 +32,7 @@ jobs: sha: ${{ inputs.sha }} wheel-tests-cuspatial: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.06 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-workflows/.github/workflows/wheels-test.yaml@branch-24.04 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.06 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df1987c30..1ad856310 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. repos: - repo: https://github.com/PyCQA/isort @@ -39,14 +39,19 @@ repos: - repo: https://github.com/codespell-project/codespell rev: v2.2.4 hooks: - - id: codespell - args: ["--config pyproject.toml"] - additional_dependencies: ["tomli"] + - id: codespell + args: ["--config pyproject.toml"] + additional_dependencies: ["tomli"] - repo: https://github.com/rapidsai/dependency-file-generator rev: v1.8.0 hooks: - id: rapids-dependency-file-generator args: ["--clean"] + - repo: https://github.com/rapidsai/pre-commit-hooks + rev: v0.0.3 + hooks: + - id: verify-copyright + default_language_version: python: python3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 47bad8a40..fa7e8b254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,34 @@ +# cuSpatial 24.04.00 (10 Apr 2024) + +## 🐛 Bug Fixes + +- Update pre-commit-hooks to v0.0.3 ([#1361](https://github.com/rapidsai/cuspatial/pull/1361)) [@KyleFromNVIDIA](https://github.com/KyleFromNVIDIA) +- Fix Python 3.11 test failures ([#1351](https://github.com/rapidsai/cuspatial/pull/1351)) [@KyleFromNVIDIA](https://github.com/KyleFromNVIDIA) +- Fix Broken CI for 24.04 ([#1338](https://github.com/rapidsai/cuspatial/pull/1338)) [@isVoid](https://github.com/isVoid) +- handle more RAPIDS version formats in update-version.sh, refactor dependencies.yaml ([#1329](https://github.com/rapidsai/cuspatial/pull/1329)) [@jameslamb](https://github.com/jameslamb) + +## 📖 Documentation + +- fix formatting in developer guide ([#1330](https://github.com/rapidsai/cuspatial/pull/1330)) [@jameslamb](https://github.com/jameslamb) + +## 🛠️ Improvements + +- Use `conda env create --yes` instead of `--force` ([#1364](https://github.com/rapidsai/cuspatial/pull/1364)) [@bdice](https://github.com/bdice) +- Add upper bound to prevent usage of NumPy 2 ([#1359](https://github.com/rapidsai/cuspatial/pull/1359)) [@bdice](https://github.com/bdice) +- Enable pytest failures on warnings from cudf (Ensure values being set are casted to the object's type) ([#1358](https://github.com/rapidsai/cuspatial/pull/1358)) [@mroeschke](https://github.com/mroeschke) +- Remove hard-coding of RAPIDS version where possible ([#1357](https://github.com/rapidsai/cuspatial/pull/1357)) [@KyleFromNVIDIA](https://github.com/KyleFromNVIDIA) +- Replace `cudf.core` imports with public APIs ([#1356](https://github.com/rapidsai/cuspatial/pull/1356)) [@mroeschke](https://github.com/mroeschke) +- Switch `pytest-xdist` algorithm to `worksteal` ([#1355](https://github.com/rapidsai/cuspatial/pull/1355)) [@bdice](https://github.com/bdice) +- Replace cudf column.full with cudf.as_column ([#1350](https://github.com/rapidsai/cuspatial/pull/1350)) [@mroeschke](https://github.com/mroeschke) +- Automate C++ include file grouping and ordering using clang-format ([#1349](https://github.com/rapidsai/cuspatial/pull/1349)) [@harrism](https://github.com/harrism) +- Add support for Python 3.11, require NumPy 1.23+ ([#1348](https://github.com/rapidsai/cuspatial/pull/1348)) [@jameslamb](https://github.com/jameslamb) +- write PROJ build dir export rules ([#1347](https://github.com/rapidsai/cuspatial/pull/1347)) [@trxcllnt](https://github.com/trxcllnt) +- Update devcontainers to CUDA Toolkit 12.2 ([#1344](https://github.com/rapidsai/cuspatial/pull/1344)) [@trxcllnt](https://github.com/trxcllnt) +- target branch-24.04 for GitHub Actions workflows ([#1343](https://github.com/rapidsai/cuspatial/pull/1343)) [@jameslamb](https://github.com/jameslamb) +- Update ops-bot.yaml ([#1337](https://github.com/rapidsai/cuspatial/pull/1337)) [@AyodeAwe](https://github.com/AyodeAwe) +- Remove -DNVBench_ENABLE_CUPTI=OFF. ([#1325](https://github.com/rapidsai/cuspatial/pull/1325)) [@bdice](https://github.com/bdice) +- Support CUDA 12.2 ([#1320](https://github.com/rapidsai/cuspatial/pull/1320)) [@jameslamb](https://github.com/jameslamb) + # cuSpatial 24.02.00 (12 Feb 2024) ## 🚨 Breaking Changes diff --git a/README.md b/README.md index b38f195d8..97ba2859a 100644 --- a/README.md +++ b/README.md @@ -113,19 +113,19 @@ 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:24.04-cuda11.8-py3.10 + nvcr.io/nvidia/rapidsai/notebooks:24.06-cuda11.8-py3.10 ``` ### Install with Conda To install via conda: -> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9 and 3.10 +> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9, 3.10, and 3.11. cuSpatial can be installed with conda (miniconda, or the full Anaconda distribution) from the rapidsai channel: ```shell conda install -c rapidsai -c conda-forge -c nvidia \ - cuspatial=24.04 python=3.10 cudatoolkit=11.8 + cuspatial=24.06 python=3.11 cudatoolkit=11.8 ``` We also provide nightly Conda packages built from the HEAD of our latest development branch. @@ -134,7 +134,7 @@ See the [RAPIDS installation documentation](https://docs.rapids.ai/install) for ### Install with pip To install via pip: -> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9 and 3.10 +> **Note** cuSpatial is supported only on Linux or [through WSL](https://rapids.ai/wsl2.html), and with Python versions 3.9, 3.10, and 3.11. The cuSpatial pip packages can be installed from NVIDIA's PyPI index. pip installations require using the matching wheel to the system's installed CUDA toolkit. - For CUDA 11 toolkits, install the `-cu11` wheels @@ -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:24.04, +@misc{cuspatial:24.06, author = {{NVIDIA Corporation}}, title = {cuSpatial: GPU-Accelerated Geospatial and Spatiotemporal Algorithms}, year = {2023}, diff --git a/VERSION b/VERSION index 4a2fe8aa5..0bff6981a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.04.00 +24.06.00 diff --git a/ci/build_docs.sh b/ci/build_docs.sh index b04dff1fc..15eb639a0 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. set -euo pipefail @@ -11,7 +11,7 @@ rapids-dependency-file-generator \ --file_key docs \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml -rapids-mamba-retry env create --force -f env.yaml -n docs +rapids-mamba-retry env create --yes -f env.yaml -n docs conda activate docs rapids-print-env @@ -27,7 +27,9 @@ rapids-mamba-retry install \ cuspatial \ cuproj -export RAPIDS_VERSION_NUMBER="24.04" +export RAPIDS_VERSION="$(rapids-version)" +export RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)" +export RAPIDS_VERSION_NUMBER="24.06" export RAPIDS_DOCS_DIR="$(mktemp -d)" rapids-logger "Build cuSpatial CPP docs" diff --git a/ci/check_style.sh b/ci/check_style.sh index e120fe418..1038b06f6 100755 --- a/ci/check_style.sh +++ b/ci/check_style.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. set -euo pipefail @@ -11,7 +11,7 @@ rapids-dependency-file-generator \ --file_key checks \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml -rapids-mamba-retry env create --force -f env.yaml -n checks +rapids-mamba-retry env create --yes -f env.yaml -n checks conda activate checks FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.02/cmake-format-rapids-cmake.json diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index deeb9d53f..8bf47d77f 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -1,4 +1,5 @@ #!/bin/bash +# Copyright (c) 2019-2024, NVIDIA CORPORATION. ############################# # cuSpatial Version Updater # ############################# @@ -29,33 +30,9 @@ function sed_runner() { sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak } -# python/cpp update -sed_runner 's/'"CUSPATIAL VERSION .* LANGUAGES"'/'"CUSPATIAL VERSION ${NEXT_FULL_TAG} LANGUAGES"'/g' cpp/CMakeLists.txt -sed_runner 's/'"CUPROJ VERSION .* LANGUAGES"'/'"CUPROJ VERSION ${NEXT_FULL_TAG} LANGUAGES"'/g' cpp/cuproj/CMakeLists.txt -sed_runner 's/'"cuspatial_version .*)"'/'"cuspatial_version ${NEXT_FULL_TAG})"'/g' python/cuspatial/CMakeLists.txt -sed_runner 's/'"cuproj_version .*)"'/'"cuproj_version ${NEXT_FULL_TAG})"'/g' python/cuproj/CMakeLists.txt -sed_runner 's/'"cuproj_version .*)"'/'"cuproj_version ${NEXT_FULL_TAG})"'/g' python/cuproj/cuproj/cuprojshim/CMakeLists.txt - -# RTD update -sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/source/conf.py -sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/source/conf.py -sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/cuproj/source/conf.py -sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/cuproj/source/conf.py - # Centralized version file update echo "${NEXT_FULL_TAG}" > VERSION -# rapids-cmake version -sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake - -# Doxyfile update - cuspatial -sed_runner "/PROJECT_NUMBER[ ]*=/ s|=.*|= ${NEXT_FULL_TAG}|g" cpp/doxygen/Doxyfile -sed_runner "/TAGFILES/ s|[0-9]\+.[0-9]\+|${NEXT_SHORT_TAG}|g" cpp/doxygen/Doxyfile - -#Doxyfile update - cuproj -sed_runner "/PROJECT_NUMBER[ ]*=/ s|=.*|= ${NEXT_FULL_TAG}|g" cpp/cuproj/doxygen/Doxyfile -sed_runner "/TAGFILES/ s|[0-9]\+.[0-9]\+|${NEXT_SHORT_TAG}|g" cpp/cuproj/doxygen/Doxyfile - # CI files for FILE in .github/workflows/*.yaml; do sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index 859820420..35a981e93 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -11,7 +11,7 @@ rapids-dependency-file-generator \ --file_key test_cpp \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml -rapids-mamba-retry env create --force -f env.yaml -n test +rapids-mamba-retry env create --yes -f env.yaml -n test # Temporarily allow unbound variables for conda activation. set +u diff --git a/ci/test_notebooks.sh b/ci/test_notebooks.sh index 457650d78..a4ae9c21c 100755 --- a/ci/test_notebooks.sh +++ b/ci/test_notebooks.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. set -euo pipefail @@ -11,7 +11,7 @@ rapids-dependency-file-generator \ --file_key test_notebooks \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml -rapids-mamba-retry env create --force -f env.yaml -n test +rapids-mamba-retry env create --yes -f env.yaml -n test # Temporarily allow unbound variables for conda activation. set +u diff --git a/ci/test_python.sh b/ci/test_python.sh index 912b2c520..c6b80ed45 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -11,7 +11,7 @@ rapids-dependency-file-generator \ --file_key test_python \ --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml -rapids-mamba-retry env create --force -f env.yaml -n test +rapids-mamba-retry env create --yes -f env.yaml -n test # Temporarily allow unbound variables for conda activation. set +u @@ -50,7 +50,7 @@ pytest \ --cache-clear \ --junitxml="${RAPIDS_TESTS_DIR}/junit-cuspatial.xml" \ --numprocesses=8 \ - --dist=loadscope \ + --dist=worksteal \ --cov-config=../.coveragerc \ --cov=cuspatial \ --cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cuspatial-coverage.xml" \ @@ -65,7 +65,7 @@ pytest \ --cache-clear \ --junitxml="${RAPIDS_TESTS_DIR}/junit-cuproj.xml" \ --numprocesses=8 \ - --dist=loadscope \ + --dist=worksteal \ --cov-config=../.coveragerc \ --cov=cuproj \ --cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cuproj-coverage.xml" \ diff --git a/ci/test_wheel_cuproj.sh b/ci/test_wheel_cuproj.sh index e89d1c650..9451190e0 100755 --- a/ci/test_wheel_cuproj.sh +++ b/ci/test_wheel_cuproj.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. set -eou pipefail @@ -19,8 +19,12 @@ python -m pip install --no-deps ./local-cuspatial-dep/cuspatial*.whl # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install $(echo ./dist/cuproj*.whl)[test] -if [[ "$(arch)" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then - python ./ci/wheel_smoke_test_cuproj.py -else - python -m pytest -n 8 ./python/cuproj/cuproj/tests -fi +rapids-logger "pytest cuproj" +pushd python/cuproj/cuproj +python -m pytest \ + --cache-clear \ + --junitxml="${RAPIDS_TESTS_DIR}/junit-cuproj.xml" \ + --numprocesses=8 \ + --dist=worksteal \ + tests +popd diff --git a/ci/test_wheel_cuspatial.sh b/ci/test_wheel_cuspatial.sh index 13f30de2c..aa36681bc 100755 --- a/ci/test_wheel_cuspatial.sh +++ b/ci/test_wheel_cuspatial.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. set -eou pipefail @@ -15,8 +15,12 @@ python -m pip install --no-binary fiona 'fiona>=1.8.19,<1.9' # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install $(echo ./dist/cuspatial*.whl)[test] -if [[ "$(arch)" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then - python ./ci/wheel_smoke_test_cuspatial.py -else - python -m pytest -n 8 ./python/cuspatial/cuspatial/tests -fi +rapids-logger "pytest cuspatial" +pushd python/cuspatial/cuspatial +python -m pytest \ + --cache-clear \ + --junitxml="${RAPIDS_TESTS_DIR}/junit-cuspatial.xml" \ + --numprocesses=8 \ + --dist=worksteal \ + tests +popd diff --git a/ci/wheel_smoke_test_cuproj.py b/ci/wheel_smoke_test_cuproj.py deleted file mode 100644 index d5b9b494a..000000000 --- a/ci/wheel_smoke_test_cuproj.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. - -from cuproj import Transformer as cuTransformer - -from cupy.testing import assert_allclose - -if __name__ == '__main__': - # Sydney opera house latitude and longitude - lat = -33.8587 - lon = 151.2140 - - # Transform to UTM using cuproj - cu_transformer = cuTransformer.from_crs("epsg:4326", "EPSG:32756") - cuproj_x, cuproj_y = cu_transformer.transform(lat, lon) - - assert_allclose(cuproj_x, 334783.9544807102) - assert_allclose(cuproj_y, 6252075.961741454) diff --git a/ci/wheel_smoke_test_cuspatial.py b/ci/wheel_smoke_test_cuspatial.py deleted file mode 100644 index df2af9abd..000000000 --- a/ci/wheel_smoke_test_cuspatial.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. - -import numpy as np -import cudf -import cuspatial -import pyarrow as pa -from shapely.geometry import Point - -if __name__ == '__main__': - order, quadtree = cuspatial.quadtree_on_points( - cuspatial.GeoSeries([Point(0.5, 0.5), Point(1.5, 1.5)]), - *(0, 2, 0, 2), # bbox - 1, # scale - 1, # max_depth - 1, # min_size - ) - cudf.testing.assert_frame_equal( - quadtree, - cudf.DataFrame( - { - "key": cudf.Series(pa.array([0, 3], type=pa.uint32())), - "level": cudf.Series(pa.array([0, 0], type=pa.uint8())), - "is_internal_node": cudf.Series(pa.array([False, False], type=pa.bool_())), - "length": cudf.Series(pa.array([1, 1], type=pa.uint32())), - "offset": cudf.Series(pa.array([0, 1], type=pa.uint32())), - } - ), - ) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 0cb8bdf64..bfe735a9b 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -11,8 +11,8 @@ dependencies: - cmake>=3.26.4 - cuda-version=11.8 - cudatoolkit -- cudf==24.4.* -- cuml==24.4.* +- cudf==24.6.* +- cuml==24.6.* - cupy>=12.0.0 - curl - cxx-compiler @@ -24,12 +24,13 @@ dependencies: - gtest>=1.13.0 - ipython - ipywidgets -- libcudf==24.4.* -- librmm==24.4.* +- libcudf==24.6.* +- librmm==24.6.* - myst-parser - nbsphinx - ninja - notebook +- numpy>=1.23,<2.0a0 - numpydoc - nvcc_linux-64=11.8 - pre-commit @@ -39,8 +40,8 @@ dependencies: - pytest - pytest-cov - pytest-xdist -- python>=3.9,<3.11 -- rmm==24.4.* +- python>=3.9,<3.12 +- rmm==24.6.* - scikit-build-core>=0.7.0 - scikit-image - shapely diff --git a/conda/environments/all_cuda-122_arch-x86_64.yaml b/conda/environments/all_cuda-122_arch-x86_64.yaml index 09e0ffcc6..65795726e 100644 --- a/conda/environments/all_cuda-122_arch-x86_64.yaml +++ b/conda/environments/all_cuda-122_arch-x86_64.yaml @@ -14,8 +14,8 @@ dependencies: - cuda-nvcc - cuda-nvrtc-dev - cuda-version=12.2 -- cudf==24.4.* -- cuml==24.4.* +- cudf==24.6.* +- cuml==24.6.* - cupy>=12.0.0 - curl - cxx-compiler @@ -27,12 +27,13 @@ dependencies: - gtest>=1.13.0 - ipython - ipywidgets -- libcudf==24.4.* -- librmm==24.4.* +- libcudf==24.6.* +- librmm==24.6.* - myst-parser - nbsphinx - ninja - notebook +- numpy>=1.23,<2.0a0 - numpydoc - pre-commit - proj @@ -41,8 +42,8 @@ dependencies: - pytest - pytest-cov - pytest-xdist -- python>=3.9,<3.11 -- rmm==24.4.* +- python>=3.9,<3.12 +- rmm==24.6.* - scikit-build-core>=0.7.0 - scikit-image - shapely diff --git a/conda/recipes/cuspatial/meta.yaml b/conda/recipes/cuspatial/meta.yaml index 780583427..c2c60133d 100644 --- a/conda/recipes/cuspatial/meta.yaml +++ b/conda/recipes/cuspatial/meta.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. {% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %} {% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} @@ -75,6 +75,7 @@ requirements: - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - cudf ={{ minor_version }} - geopandas >=0.11.0 + - numpy >=1.23,<2.0a0 - python - rmm ={{ minor_version }} diff --git a/conda/recipes/libcuspatial/build.sh b/conda/recipes/libcuspatial/build.sh index e942f6094..4c6da113e 100644 --- a/conda/recipes/libcuspatial/build.sh +++ b/conda/recipes/libcuspatial/build.sh @@ -1,5 +1,4 @@ # Copyright (c) 2018-2023, NVIDIA CORPORATION. # build cuspatial with verbose output -./build.sh -v libcuspatial tests benchmarks --allgpuarch -n \ - --cmake-args=\"-DNVBench_ENABLE_CUPTI=OFF\" +./build.sh -v libcuspatial tests benchmarks --allgpuarch -n diff --git a/cpp/.clang-format b/cpp/.clang-format index 6019a6f3d..a0ae89a0f 100644 --- a/cpp/.clang-format +++ b/cpp/.clang-format @@ -15,7 +15,7 @@ AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: true +AllowShortBlocksOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: All @@ -27,7 +27,7 @@ AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: false +BinPackArguments: false BinPackParameters: false BraceWrapping: AfterClass: false @@ -71,8 +71,28 @@ ForEachMacros: - foreach - Q_FOREACH - BOOST_FOREACH -IncludeBlocks: Preserve -IncludeIsMainRegex: '([-_](test|unittest))?$' +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^"' # quoted includes + Priority: 1 + - Regex: '^<(benchmarks|tests)/' # benchmark includes + Priority: 2 + - Regex: '^<(cuspatial_test|cuproj_test)/' # cuSpatial/cuProj test includes + Priority: 3 + - Regex: '^<(cuspatial|cuproj)/' # cuSpatial/cuProj includes + Priority: 4 + - Regex: '^<(cudf_test|cudf|cuml|raft|kvikio)' # Other RAPIDS includes + Priority: 5 + - Regex: '^ - #include #include +#include + #include #include diff --git a/cpp/benchmarks/distance/pairwise_linestring_distance.cu b/cpp/benchmarks/distance/pairwise_linestring_distance.cu index c17c59b0d..539f8992a 100644 --- a/cpp/benchmarks/distance/pairwise_linestring_distance.cu +++ b/cpp/benchmarks/distance/pairwise_linestring_distance.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ #include -#include #include @@ -23,6 +22,8 @@ #include +#include + using namespace cuspatial; template diff --git a/cpp/benchmarks/distance/pairwise_linestring_polygon_distance.cu b/cpp/benchmarks/distance/pairwise_linestring_polygon_distance.cu index 0d4fdf574..703cdc5e5 100644 --- a/cpp/benchmarks/distance/pairwise_linestring_polygon_distance.cu +++ b/cpp/benchmarks/distance/pairwise_linestring_polygon_distance.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ #include -#include #include @@ -23,6 +22,8 @@ #include +#include + using namespace cuspatial; template diff --git a/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu b/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu index c3f84da70..3bb08dd11 100644 --- a/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu +++ b/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ #include -#include #include @@ -25,6 +24,8 @@ #include #include +#include + using namespace cuspatial; using namespace cuspatial::test; diff --git a/cpp/benchmarks/indexing/quadtree_on_points.cu b/cpp/benchmarks/indexing/quadtree_on_points.cu index 4984834f7..8f6448505 100644 --- a/cpp/benchmarks/indexing/quadtree_on_points.cu +++ b/cpp/benchmarks/indexing/quadtree_on_points.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,19 @@ * limitations under the License. */ +#include + #include #include -#include -#include - #include #include - #include + #include +#include + using namespace cuspatial; template diff --git a/cpp/benchmarks/point_in_polygon/point_in_polygon.cu b/cpp/benchmarks/point_in_polygon/point_in_polygon.cu index 7f41dd371..71e089cd8 100644 --- a/cpp/benchmarks/point_in_polygon/point_in_polygon.cu +++ b/cpp/benchmarks/point_in_polygon/point_in_polygon.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ */ #include -#include #include @@ -27,6 +26,8 @@ #include +#include + #include #include diff --git a/cpp/benchmarks/points_in_range/points_in_range.cu b/cpp/benchmarks/points_in_range/points_in_range.cu index b9bced1be..181f48429 100644 --- a/cpp/benchmarks/points_in_range/points_in_range.cu +++ b/cpp/benchmarks/points_in_range/points_in_range.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +26,14 @@ #include #include -#include - #include #include #include #include #include +#include + #include using cuspatial::vec_2d; diff --git a/cpp/benchmarks/synchronization/synchronization.hpp b/cpp/benchmarks/synchronization/synchronization.hpp index 5e84e9fb9..631b34405 100644 --- a/cpp/benchmarks/synchronization/synchronization.hpp +++ b/cpp/benchmarks/synchronization/synchronization.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. + * Copyright (c) 2019-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,14 @@ * limitations under the License. */ +#pragma once + +#include + +#include + +#include + /** * @file synchronization.hpp * @brief This is the header file for `cuda_event_timer`. @@ -52,22 +60,8 @@ // Register the function as a benchmark. You will need to set the `UseManualTime()` // flag in order to use the timer embedded in this class. BENCHMARK(sample_cuda_benchmark)->UseManualTime(); - - **/ -#ifndef CUDF_BENCH_SYNCHRONIZATION_H -#define CUDF_BENCH_SYNCHRONIZATION_H - -// Google Benchmark library -#include - -#include - -#include - -#include - class cuda_event_timer { public: /** @@ -99,5 +93,3 @@ class cuda_event_timer { rmm::cuda_stream_view stream; benchmark::State* p_state; }; - -#endif diff --git a/cpp/benchmarks/utility/floating_point_equality.cu b/cpp/benchmarks/utility/floating_point_equality.cu index f0f99c4d8..cd44b9a5a 100644 --- a/cpp/benchmarks/utility/floating_point_equality.cu +++ b/cpp/benchmarks/utility/floating_point_equality.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ #include + #include #include @@ -23,10 +24,10 @@ #include #include -#include - #include +#include + #include #include diff --git a/cpp/cuproj/CMakeLists.txt b/cpp/cuproj/CMakeLists.txt index fe339760f..35ba0277e 100644 --- a/cpp/cuproj/CMakeLists.txt +++ b/cpp/cuproj/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR) -include(../../fetch_rapids.cmake) +include(../../rapids_config.cmake) include(rapids-cmake) include(rapids-cpm) include(rapids-cuda) @@ -25,7 +25,7 @@ include(rapids-find) rapids_cuda_init_architectures(CUPROJ) -project(CUPROJ VERSION 24.04.00 LANGUAGES C CXX CUDA) +project(CUPROJ VERSION "${RAPIDS_VERSION}" 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. @@ -237,7 +237,7 @@ if(DOXYGEN_FOUND) add_custom_command( OUTPUT CUPROJ_DOXYGEN WORKING_DIRECTORY ${CUPROJ_SOURCE_DIR}/doxygen - COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile + COMMAND ${CMAKE_COMMAND} -E env "RAPIDS_VERSION=${RAPIDS_VERSION}" "RAPIDS_VERSION_MAJOR_MINOR=${RAPIDS_VERSION_MAJOR_MINOR}" ${DOXYGEN_EXECUTABLE} Doxyfile VERBATIM COMMENT "Custom command for building cuproj doxygen docs." ) diff --git a/cpp/cuproj/benchmarks/synchronization/synchronization.hpp b/cpp/cuproj/benchmarks/synchronization/synchronization.hpp index 169450ead..631b34405 100644 --- a/cpp/cuproj/benchmarks/synchronization/synchronization.hpp +++ b/cpp/cuproj/benchmarks/synchronization/synchronization.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, NVIDIA CORPORATION. + * Copyright (c) 2019-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,14 @@ * limitations under the License. */ +#pragma once + +#include + +#include + +#include + /** * @file synchronization.hpp * @brief This is the header file for `cuda_event_timer`. @@ -52,22 +60,8 @@ // Register the function as a benchmark. You will need to set the `UseManualTime()` // flag in order to use the timer embedded in this class. BENCHMARK(sample_cuda_benchmark)->UseManualTime(); - - **/ -#ifndef CUDF_BENCH_SYNCHRONIZATION_H -#define CUDF_BENCH_SYNCHRONIZATION_H - -// Google Benchmark library -#include - -#include - -#include - -#include - class cuda_event_timer { public: /** @@ -99,5 +93,3 @@ class cuda_event_timer { rmm::cuda_stream_view stream; benchmark::State* p_state; }; - -#endif diff --git a/cpp/cuproj/benchmarks/wgs_to_utm_bench.cu b/cpp/cuproj/benchmarks/wgs_to_utm_bench.cu index 7fe4c04ac..0533a0d65 100644 --- a/cpp/cuproj/benchmarks/wgs_to_utm_bench.cu +++ b/cpp/cuproj/benchmarks/wgs_to_utm_bench.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include diff --git a/cpp/cuproj/cmake/thirdparty/get_proj.cmake b/cpp/cuproj/cmake/thirdparty/get_proj.cmake index cd0b914eb..7c916193b 100644 --- a/cpp/cuproj/cmake/thirdparty/get_proj.cmake +++ b/cpp/cuproj/cmake/thirdparty/get_proj.cmake @@ -27,6 +27,26 @@ function(find_and_configure_proj VERSION) GIT_TAG ${VERSION} GIT_SHALLOW TRUE ) + + if(PROJ_ADDED) + install(TARGETS proj EXPORT proj-exports) + + # write build export rules + rapids_export( + BUILD PROJ + VERSION ${VERSION} + EXPORT_SET proj-exports + GLOBAL_TARGETS proj + NAMESPACE PROJ::) + + include("${rapids-cmake-dir}/export/find_package_root.cmake") + # When using cuPROJ from the build dir, ensure PROJ is also found in cuPROJ's build dir. This + # line adds `set(PROJ_ROOT "${CMAKE_CURRENT_LIST_DIR}")` to build/cuproj-dependencies.cmake + rapids_export_find_package_root( + BUILD PROJ [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cuproj-exports + ) + endif() + endfunction() find_and_configure_proj(9.2.0) diff --git a/cpp/cuproj/doxygen/Doxyfile b/cpp/cuproj/doxygen/Doxyfile index 55c780084..986e5d6c6 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 = 24.04.00 +PROJECT_NUMBER = $(RAPIDS_VERSION) # 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/24.04 "libcudf.tag=https://docs.rapids.ai/api/libcudf/24.04" +TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/$(RAPIDS_VERSION_MAJOR_MINOR) "libcudf.tag=https://docs.rapids.ai/api/libcudf/$(RAPIDS_VERSION_MAJOR_MINOR)" # 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/cuproj/tests/wgs_to_utm_test.cu b/cpp/cuproj/tests/wgs_to_utm_test.cu index a78756802..7a732c5da 100644 --- a/cpp/cuproj/tests/wgs_to_utm_test.cu +++ b/cpp/cuproj/tests/wgs_to_utm_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,13 +16,12 @@ #include #include +#include #include #include #include -#include - #include #include @@ -30,9 +29,8 @@ #include #include -#include - #include +#include #include #include diff --git a/cpp/doxygen/Doxyfile b/cpp/doxygen/Doxyfile index eb4bbff22..2cc6f51d3 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 = 24.04.00 +PROJECT_NUMBER = $(RAPIDS_VERSION) # 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/24.04 "libcudf.tag=https://docs.rapids.ai/api/libcudf/24.04" +TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/$(RAPIDS_VERSION_MAJOR_MINOR) "libcudf.tag=https://docs.rapids.ai/api/libcudf/$(RAPIDS_VERSION_MAJOR_MINOR)" # 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/include/cuspatial/detail/algorithm/is_point_in_polygon.cuh b/cpp/include/cuspatial/detail/algorithm/is_point_in_polygon.cuh index 2bbd3839d..ef5496d1a 100644 --- a/cpp/include/cuspatial/detail/algorithm/is_point_in_polygon.cuh +++ b/cpp/include/cuspatial/detail/algorithm/is_point_in_polygon.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,13 @@ #pragma once +#include +#include #include #include #include #include -#include -#include - #include namespace cuspatial { diff --git a/cpp/include/cuspatial/detail/bounding_boxes.cuh b/cpp/include/cuspatial/detail/bounding_boxes.cuh index 2e2e3f6e5..22d749e9c 100644 --- a/cpp/include/cuspatial/detail/bounding_boxes.cuh +++ b/cpp/include/cuspatial/detail/bounding_boxes.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ #include #include #include + #include namespace cuspatial { diff --git a/cpp/include/cuspatial/detail/distance/hausdorff.cuh b/cpp/include/cuspatial/detail/distance/hausdorff.cuh index 3b25014a4..aa955a7d6 100644 --- a/cpp/include/cuspatial/detail/distance/hausdorff.cuh +++ b/cpp/include/cuspatial/detail/distance/hausdorff.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,7 @@ #include #include -#include - +#include #include #include #include @@ -33,7 +32,7 @@ #include #include -#include +#include #include diff --git a/cpp/include/cuspatial/detail/find/find_and_combine_segment.cuh b/cpp/include/cuspatial/detail/find/find_and_combine_segment.cuh index 5694088ad..2cdbfd425 100644 --- a/cpp/include/cuspatial/detail/find/find_and_combine_segment.cuh +++ b/cpp/include/cuspatial/detail/find/find_and_combine_segment.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,11 @@ #include #include -#include - #include #include +#include + namespace cuspatial { namespace detail { diff --git a/cpp/include/cuspatial/detail/find/find_duplicate_points.cuh b/cpp/include/cuspatial/detail/find/find_duplicate_points.cuh index 430a0bc5e..de18bb927 100644 --- a/cpp/include/cuspatial/detail/find/find_duplicate_points.cuh +++ b/cpp/include/cuspatial/detail/find/find_duplicate_points.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,10 +22,10 @@ #include #include -#include - #include +#include + namespace cuspatial { namespace detail { diff --git a/cpp/include/cuspatial/detail/geometry/linestring_ref.cuh b/cpp/include/cuspatial/detail/geometry/linestring_ref.cuh index 2e0e7370f..4b0d9d484 100644 --- a/cpp/include/cuspatial/detail/geometry/linestring_ref.cuh +++ b/cpp/include/cuspatial/detail/geometry/linestring_ref.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,11 @@ #include #include +#include +#include #include #include -#include -#include #include #include diff --git a/cpp/include/cuspatial/detail/geometry/polygon_ref.cuh b/cpp/include/cuspatial/detail/geometry/polygon_ref.cuh index ffb3ea2bb..a7da32644 100644 --- a/cpp/include/cuspatial/detail/geometry/polygon_ref.cuh +++ b/cpp/include/cuspatial/detail/geometry/polygon_ref.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,12 @@ #include #include +#include +#include #include #include #include -#include -#include #include #include diff --git a/cpp/include/cuspatial/detail/index/construction/phase_1.cuh b/cpp/include/cuspatial/detail/index/construction/phase_1.cuh index b06dbc6bb..3d06c93b1 100644 --- a/cpp/include/cuspatial/detail/index/construction/phase_1.cuh +++ b/cpp/include/cuspatial/detail/index/construction/phase_1.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -38,8 +39,6 @@ #include #include -#include - #include #include #include diff --git a/cpp/include/cuspatial/detail/intersection/linestring_intersection.cuh b/cpp/include/cuspatial/detail/intersection/linestring_intersection.cuh index 2db5492ed..1d88e5e36 100644 --- a/cpp/include/cuspatial/detail/intersection/linestring_intersection.cuh +++ b/cpp/include/cuspatial/detail/intersection/linestring_intersection.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -49,8 +50,6 @@ #include #include -#include - #include #include diff --git a/cpp/include/cuspatial/detail/intersection/linestring_intersection_count.cuh b/cpp/include/cuspatial/detail/intersection/linestring_intersection_count.cuh index a0297b05b..b164fa729 100644 --- a/cpp/include/cuspatial/detail/intersection/linestring_intersection_count.cuh +++ b/cpp/include/cuspatial/detail/intersection/linestring_intersection_count.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,10 +23,10 @@ #include -#include - #include +#include + namespace cuspatial { namespace detail { diff --git a/cpp/include/cuspatial/detail/intersection/linestring_intersection_with_duplicates.cuh b/cpp/include/cuspatial/detail/intersection/linestring_intersection_with_duplicates.cuh index 3279df2f9..e513cf651 100644 --- a/cpp/include/cuspatial/detail/intersection/linestring_intersection_with_duplicates.cuh +++ b/cpp/include/cuspatial/detail/intersection/linestring_intersection_with_duplicates.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,8 +30,6 @@ #include #include -#include - #include #include #include @@ -42,6 +40,8 @@ #include #include +#include + #include #include diff --git a/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh b/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh index c3009b1b2..43ff7b0f6 100644 --- a/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh +++ b/cpp/include/cuspatial/detail/join/quadtree_bbox_filtering.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +22,8 @@ #include #include -#include - #include +#include #include #include 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 f594f51a3..6335f133f 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,14 +28,13 @@ #include #include +#include #include #include #include #include #include -#include - #include namespace cuspatial { diff --git a/cpp/include/cuspatial/detail/kernel/pairwise_distance.cuh b/cpp/include/cuspatial/detail/kernel/pairwise_distance.cuh index 48c139e1e..9786681d9 100644 --- a/cpp/include/cuspatial/detail/kernel/pairwise_distance.cuh +++ b/cpp/include/cuspatial/detail/kernel/pairwise_distance.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ #include -#include - #include +#include + #include namespace cuspatial { diff --git a/cpp/include/cuspatial/detail/pairwise_multipoint_equals_count.cuh b/cpp/include/cuspatial/detail/pairwise_multipoint_equals_count.cuh index 614a3f2d4..141a85d61 100644 --- a/cpp/include/cuspatial/detail/pairwise_multipoint_equals_count.cuh +++ b/cpp/include/cuspatial/detail/pairwise_multipoint_equals_count.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,6 @@ #include #include -#include - #include #include #include @@ -35,6 +33,8 @@ #include #include +#include + #include #include diff --git a/cpp/include/cuspatial/detail/point_in_polygon.cuh b/cpp/include/cuspatial/detail/point_in_polygon.cuh index bd7c0b805..119d48ecb 100644 --- a/cpp/include/cuspatial/detail/point_in_polygon.cuh +++ b/cpp/include/cuspatial/detail/point_in_polygon.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ #include #include - #include #include diff --git a/cpp/include/cuspatial/detail/point_linestring_nearest_points.cuh b/cpp/include/cuspatial/detail/point_linestring_nearest_points.cuh index c1c7bfc77..f085204eb 100644 --- a/cpp/include/cuspatial/detail/point_linestring_nearest_points.cuh +++ b/cpp/include/cuspatial/detail/point_linestring_nearest_points.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,10 @@ #include #include -#include - #include +#include + #include #include #include diff --git a/cpp/include/cuspatial/detail/point_quadtree.cuh b/cpp/include/cuspatial/detail/point_quadtree.cuh index ebe9b02e6..7e0d70dac 100644 --- a/cpp/include/cuspatial/detail/point_quadtree.cuh +++ b/cpp/include/cuspatial/detail/point_quadtree.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,12 @@ #include #include +#include #include #include #include #include -#include - #include namespace cuspatial { diff --git a/cpp/include/cuspatial/detail/range/multipoint_range.cuh b/cpp/include/cuspatial/detail/range/multipoint_range.cuh index e69351608..e73e0e0d3 100644 --- a/cpp/include/cuspatial/detail/range/multipoint_range.cuh +++ b/cpp/include/cuspatial/detail/range/multipoint_range.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,17 +16,17 @@ #pragma once -#include -#include -#include -#include - #include #include #include #include #include +#include +#include +#include +#include + namespace cuspatial { using namespace cuspatial::detail; diff --git a/cpp/include/cuspatial/detail/trajectory/derive_trajectories.cuh b/cpp/include/cuspatial/detail/trajectory/derive_trajectories.cuh index 6a1a1c0a7..6da914181 100644 --- a/cpp/include/cuspatial/detail/trajectory/derive_trajectories.cuh +++ b/cpp/include/cuspatial/detail/trajectory/derive_trajectories.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -30,8 +31,6 @@ #include #include -#include - #include namespace cuspatial { diff --git a/cpp/include/cuspatial/detail/trajectory/trajectory_distances_and_speeds.cuh b/cpp/include/cuspatial/detail/trajectory/trajectory_distances_and_speeds.cuh index baede9b92..9ce7baef5 100644 --- a/cpp/include/cuspatial/detail/trajectory/trajectory_distances_and_speeds.cuh +++ b/cpp/include/cuspatial/detail/trajectory/trajectory_distances_and_speeds.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -31,8 +32,6 @@ #include #include -#include - namespace cuspatial { template #include #include #include -#include - #include namespace cuspatial { diff --git a/cpp/include/cuspatial/pairwise_multipoint_equals_count.hpp b/cpp/include/cuspatial/pairwise_multipoint_equals_count.hpp index 8dca3185e..9bfb13700 100644 --- a/cpp/include/cuspatial/pairwise_multipoint_equals_count.hpp +++ b/cpp/include/cuspatial/pairwise_multipoint_equals_count.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,10 @@ #pragma once -#include - #include +#include + #include #include diff --git a/cpp/include/cuspatial_test/base_fixture.hpp b/cpp/include/cuspatial_test/base_fixture.hpp index 44a22d2bb..c9927b489 100644 --- a/cpp/include/cuspatial_test/base_fixture.hpp +++ b/cpp/include/cuspatial_test/base_fixture.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ #pragma once +#include + #include #include -#include - namespace cuspatial { namespace test { diff --git a/cpp/include/cuspatial_test/column_factories.hpp b/cpp/include/cuspatial_test/column_factories.hpp index 30f426cdc..14ac03bf3 100644 --- a/cpp/include/cuspatial_test/column_factories.hpp +++ b/cpp/include/cuspatial_test/column_factories.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,12 @@ #include #include #include - #include +#include + #include #include -#include namespace cuspatial { namespace test { diff --git a/cpp/include/cuspatial_test/geometry_fixtures.hpp b/cpp/include/cuspatial_test/geometry_fixtures.hpp index d52775785..44d8410e2 100644 --- a/cpp/include/cuspatial_test/geometry_fixtures.hpp +++ b/cpp/include/cuspatial_test/geometry_fixtures.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,11 +22,11 @@ #include #include +#include + #include #include -#include - namespace cuspatial { namespace test { diff --git a/cpp/include/cuspatial_test/geometry_generator.cuh b/cpp/include/cuspatial_test/geometry_generator.cuh index f966664fb..a3efa5812 100644 --- a/cpp/include/cuspatial_test/geometry_generator.cuh +++ b/cpp/include/cuspatial_test/geometry_generator.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,11 +28,11 @@ #include #include -#include - #include #include +#include + namespace cuspatial { namespace test { diff --git a/cpp/include/cuspatial_test/random.cuh b/cpp/include/cuspatial_test/random.cuh index d2a65af3b..6fd63f79f 100644 --- a/cpp/include/cuspatial_test/random.cuh +++ b/cpp/include/cuspatial_test/random.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,14 +22,13 @@ #include +#include #include #include #include #include #include -#include - #include #include diff --git a/cpp/include/cuspatial_test/vector_equality.hpp b/cpp/include/cuspatial_test/vector_equality.hpp index a352b6a8f..a8278f2d0 100644 --- a/cpp/include/cuspatial_test/vector_equality.hpp +++ b/cpp/include/cuspatial_test/vector_equality.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ #pragma once +#include + #include #include #include -#include - #include #include diff --git a/cpp/src/bounding_boxes/polygon_bounding_boxes.cu b/cpp/src/bounding_boxes/polygon_bounding_boxes.cu index 9fdca1bd5..e38e12dfd 100644 --- a/cpp/src/bounding_boxes/polygon_bounding_boxes.cu +++ b/cpp/src/bounding_boxes/polygon_bounding_boxes.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,8 @@ * limitations under the License. */ -#include - #include +#include #include #include diff --git a/cpp/src/distance/linestring_polygon_distance.cu b/cpp/src/distance/linestring_polygon_distance.cu index 347f998fa..b6d370b90 100644 --- a/cpp/src/distance/linestring_polygon_distance.cu +++ b/cpp/src/distance/linestring_polygon_distance.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,14 @@ #include "../utility/multi_geometry_dispatch.hpp" +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -27,14 +35,6 @@ #include -#include -#include -#include -#include -#include -#include -#include - #include #include diff --git a/cpp/src/distance/point_polygon_distance.cu b/cpp/src/distance/point_polygon_distance.cu index ecd5e06aa..dd7364fbd 100644 --- a/cpp/src/distance/point_polygon_distance.cu +++ b/cpp/src/distance/point_polygon_distance.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,14 @@ #include "../utility/multi_geometry_dispatch.hpp" +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -27,14 +35,6 @@ #include -#include -#include -#include -#include -#include -#include -#include - #include #include diff --git a/cpp/src/distance/polygon_distance.cu b/cpp/src/distance/polygon_distance.cu index d31db9bb9..678aa3f56 100644 --- a/cpp/src/distance/polygon_distance.cu +++ b/cpp/src/distance/polygon_distance.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,13 @@ #include "../utility/multi_geometry_dispatch.hpp" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -26,13 +33,6 @@ #include -#include -#include -#include -#include -#include -#include - #include #include diff --git a/cpp/src/join/quadtree_bbox_filtering.cu b/cpp/src/join/quadtree_bbox_filtering.cu index 42b07c015..59bd369cd 100644 --- a/cpp/src/join/quadtree_bbox_filtering.cu +++ b/cpp/src/join/quadtree_bbox_filtering.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,9 @@ * limitations under the License. */ -#include -#include - #include #include +#include #include #include diff --git a/cpp/src/join/quadtree_point_in_polygon.cu b/cpp/src/join/quadtree_point_in_polygon.cu index 2d94504af..75b723aa8 100644 --- a/cpp/src/join/quadtree_point_in_polygon.cu +++ b/cpp/src/join/quadtree_point_in_polygon.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,13 @@ * limitations under the License. */ +#include +#include #include #include #include #include -#include -#include - #include #include #include diff --git a/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp b/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp index d742b0cc7..fb4fab6db 100644 --- a/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp +++ b/cpp/tests/bounding_boxes/linestring_bounding_boxes_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ #include #include - #include struct LinestringBoundingBoxErrorTest : public ::testing::Test {}; diff --git a/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp b/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp index 07f6ac2f0..83be1f845 100644 --- a/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp +++ b/cpp/tests/bounding_boxes/polygon_bounding_boxes_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ #include #include #include - #include #include diff --git a/cpp/tests/distance/hausdorff_test.cpp b/cpp/tests/distance/hausdorff_test.cpp index 2111e3330..10335c519 100644 --- a/cpp/tests/distance/hausdorff_test.cpp +++ b/cpp/tests/distance/hausdorff_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ #include #include - #include #include #include diff --git a/cpp/tests/distance/hausdorff_test.cu b/cpp/tests/distance/hausdorff_test.cu index 6ef18341f..7b923ec8c 100644 --- a/cpp/tests/distance/hausdorff_test.cu +++ b/cpp/tests/distance/hausdorff_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include +#include #include #include #include @@ -30,8 +31,6 @@ #include #include -#include - #include template diff --git a/cpp/tests/distance/linestring_distance_test.cu b/cpp/tests/distance/linestring_distance_test.cu index 0748d9c59..830512cc3 100644 --- a/cpp/tests/distance/linestring_distance_test.cu +++ b/cpp/tests/distance/linestring_distance_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include #include #include + #include #include diff --git a/cpp/tests/distance/linestring_polygon_distance_test.cpp b/cpp/tests/distance/linestring_polygon_distance_test.cpp index 95beec0bd..4ce0c9e65 100644 --- a/cpp/tests/distance/linestring_polygon_distance_test.cpp +++ b/cpp/tests/distance/linestring_polygon_distance_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,10 @@ #include #include +#include #include #include -#include - #include #include diff --git a/cpp/tests/distance/point_polygon_distance_test.cpp b/cpp/tests/distance/point_polygon_distance_test.cpp index dfb486b69..07a90667b 100644 --- a/cpp/tests/distance/point_polygon_distance_test.cpp +++ b/cpp/tests/distance/point_polygon_distance_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ * limitations under the License. */ +#include +#include + #include #include #include #include #include -#include -#include - #include #include diff --git a/cpp/tests/distance/polygon_distance_test.cpp b/cpp/tests/distance/polygon_distance_test.cpp index c1a2e8b4f..b6d345f56 100644 --- a/cpp/tests/distance/polygon_distance_test.cpp +++ b/cpp/tests/distance/polygon_distance_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,11 +23,10 @@ #include #include +#include #include #include -#include - #include #include diff --git a/cpp/tests/equality/pairwise_multipoint_equals_count_test.cpp b/cpp/tests/equality/pairwise_multipoint_equals_count_test.cpp index 1d2923e4b..b096abd69 100644 --- a/cpp/tests/equality/pairwise_multipoint_equals_count_test.cpp +++ b/cpp/tests/equality/pairwise_multipoint_equals_count_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -#include #include #include #include +#include #include #include #include @@ -27,6 +27,7 @@ #include #include + #include using namespace cuspatial; diff --git a/cpp/tests/find/find_duplicate_points_test.cu b/cpp/tests/find/find_duplicate_points_test.cu index 49bc86bb9..947ebd8eb 100644 --- a/cpp/tests/find/find_duplicate_points_test.cu +++ b/cpp/tests/find/find_duplicate_points_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,12 @@ #include #include -#include -#include - #include #include +#include +#include + using namespace cuspatial; using namespace cuspatial::detail; using namespace cuspatial::test; diff --git a/cpp/tests/find/find_points_on_segments_test.cu b/cpp/tests/find/find_points_on_segments_test.cu index 4296f6479..cd6a2e37f 100644 --- a/cpp/tests/find/find_points_on_segments_test.cu +++ b/cpp/tests/find/find_points_on_segments_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,13 @@ #include #include -#include -#include - #include #include #include +#include +#include + #include using namespace cuspatial; diff --git a/cpp/tests/index/point_quadtree_test.cpp b/cpp/tests/index/point_quadtree_test.cpp index 93978e093..1f6c11dba 100644 --- a/cpp/tests/index/point_quadtree_test.cpp +++ b/cpp/tests/index/point_quadtree_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ #include #include #include - #include #include #include diff --git a/cpp/tests/intersection/linestring_intersection_count_test.cu b/cpp/tests/intersection/linestring_intersection_count_test.cu index 24467462e..cec8be291 100644 --- a/cpp/tests/intersection/linestring_intersection_count_test.cu +++ b/cpp/tests/intersection/linestring_intersection_count_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,10 +26,10 @@ #include #include #include -#include - #include + #include +#include #include #include diff --git a/cpp/tests/intersection/linestring_intersection_test.cpp b/cpp/tests/intersection/linestring_intersection_test.cpp index b48d1b057..9b9318104 100644 --- a/cpp/tests/intersection/linestring_intersection_test.cpp +++ b/cpp/tests/intersection/linestring_intersection_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ * limitations under the License. */ -#include - #include #include #include @@ -32,9 +30,9 @@ #include #include #include - #include #include +#include #include #include diff --git a/cpp/tests/intersection/linestring_intersection_with_duplicates_test.cu b/cpp/tests/intersection/linestring_intersection_with_duplicates_test.cu index 195968615..359b45700 100644 --- a/cpp/tests/intersection/linestring_intersection_with_duplicates_test.cu +++ b/cpp/tests/intersection/linestring_intersection_with_duplicates_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,13 +32,12 @@ #include #include +#include #include #include #include #include -#include - #include #include diff --git a/cpp/tests/join/join_quadtree_and_bounding_boxes_test.cpp b/cpp/tests/join/join_quadtree_and_bounding_boxes_test.cpp index e7d6d5948..34a16208e 100644 --- a/cpp/tests/join/join_quadtree_and_bounding_boxes_test.cpp +++ b/cpp/tests/join/join_quadtree_and_bounding_boxes_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ #include #include - #include #include #include diff --git a/cpp/tests/join/quadtree_point_in_polygon_test.cpp b/cpp/tests/join/quadtree_point_in_polygon_test.cpp index c3d720c10..592e7a52e 100644 --- a/cpp/tests/join/quadtree_point_in_polygon_test.cpp +++ b/cpp/tests/join/quadtree_point_in_polygon_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,20 @@ * limitations under the License. */ -#include #include #include #include #include #include +#include #include #include #include - #include #include #include + #include using T = float; diff --git a/cpp/tests/join/quadtree_point_in_polygon_test_large.cu b/cpp/tests/join/quadtree_point_in_polygon_test_large.cu index dbbe1d44d..aa915e43d 100644 --- a/cpp/tests/join/quadtree_point_in_polygon_test_large.cu +++ b/cpp/tests/join/quadtree_point_in_polygon_test_large.cu @@ -30,8 +30,8 @@ #include #include #include - #include + #include #include diff --git a/cpp/tests/join/quadtree_point_in_polygon_test_small.cu b/cpp/tests/join/quadtree_point_in_polygon_test_small.cu index 52792dd9b..2439347b1 100644 --- a/cpp/tests/join/quadtree_point_in_polygon_test_small.cu +++ b/cpp/tests/join/quadtree_point_in_polygon_test_small.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ #include #include + #include /* diff --git a/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp b/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp index d78cda350..bfca5b024 100644 --- a/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp +++ b/cpp/tests/join/quadtree_point_to_nearest_linestring_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,20 @@ * limitations under the License. */ -#include #include #include #include #include #include +#include #include #include #include - #include #include #include + #include using T = float; diff --git a/cpp/tests/points_in_range/points_in_range_test.cpp b/cpp/tests/points_in_range/points_in_range_test.cpp index 37f7b153d..449a1a5b3 100644 --- a/cpp/tests/points_in_range/points_in_range_test.cpp +++ b/cpp/tests/points_in_range/points_in_range_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2023, NVIDIA CORPORATION. + * Copyright (c) 2020-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ #include #include - #include #include #include diff --git a/cpp/tests/points_in_range/points_in_range_test.cu b/cpp/tests/points_in_range/points_in_range_test.cu index ca638fbdc..235cd476d 100644 --- a/cpp/tests/points_in_range/points_in_range_test.cu +++ b/cpp/tests/points_in_range/points_in_range_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,15 +20,15 @@ #include #include -#include #include #include #include -#include - #include +#include +#include + template using Vec = cuspatial::vec_2d; diff --git a/cpp/tests/projection/sinusoidal_projection_test.cu b/cpp/tests/projection/sinusoidal_projection_test.cu index 41c2202e1..031a15c73 100644 --- a/cpp/tests/projection/sinusoidal_projection_test.cu +++ b/cpp/tests/projection/sinusoidal_projection_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,17 +14,18 @@ * limitations under the License. */ +#include + #include #include #include -#include #include -#include - #include +#include + template inline T midpoint(T a, T b) { diff --git a/cpp/tests/range/multilinestring_range_test.cu b/cpp/tests/range/multilinestring_range_test.cu index 11c17e5ac..4938e0df4 100644 --- a/cpp/tests/range/multilinestring_range_test.cu +++ b/cpp/tests/range/multilinestring_range_test.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include - #include +#include #include #include diff --git a/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu b/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu index 819dae901..bf084fcee 100644 --- a/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu +++ b/cpp/tests/trajectory/trajectory_distances_and_speeds_test.cu @@ -1,6 +1,6 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,11 +26,10 @@ #include +#include #include #include -#include - #include #include diff --git a/cpp/tests/trajectory/trajectory_test_utils.cuh b/cpp/tests/trajectory/trajectory_test_utils.cuh index 847748fc6..b150e7284 100644 --- a/cpp/tests/trajectory/trajectory_test_utils.cuh +++ b/cpp/tests/trajectory/trajectory_test_utils.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,15 @@ #pragma once +#include + #include #include -#include - #include #include +#include #include #include #include @@ -34,8 +35,6 @@ #include #include -#include - #include namespace cuspatial { diff --git a/cpp/tests/utility_test/test_float_equivalent.cu b/cpp/tests/utility_test/test_float_equivalent.cu index 8fe74c357..b459ae787 100644 --- a/cpp/tests/utility_test/test_float_equivalent.cu +++ b/cpp/tests/utility_test/test_float_equivalent.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,16 @@ * limitations under the License. */ -#include #include -#include +#include + #include #include +#include + using namespace cuspatial; using namespace cuspatial::test; diff --git a/cpp/tests/utility_test/test_geometry_generators.cu b/cpp/tests/utility_test/test_geometry_generators.cu index d0b35e9e4..70910d6aa 100644 --- a/cpp/tests/utility_test/test_geometry_generators.cu +++ b/cpp/tests/utility_test/test_geometry_generators.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ #include #include + #include using namespace cuspatial; diff --git a/dependencies.yaml b/dependencies.yaml index f8e8b8a17..d04502adf 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -124,8 +124,8 @@ dependencies: - cxx-compiler - gmock>=1.13.0 - gtest>=1.13.0 - - libcudf==24.4.* - - librmm==24.4.* + - libcudf==24.6.* + - librmm==24.6.* - proj - sqlite specific: @@ -169,7 +169,7 @@ dependencies: - cxx-compiler - gmock>=1.13.0 - gtest>=1.13.0 - - librmm==24.4.* + - librmm==24.6.* - proj - sqlite specific: @@ -324,13 +324,18 @@ dependencies: packages: - python=3.10 - matrix: + py: "3.11" packages: - - python>=3.9,<3.11 + - python=3.11 + - matrix: + packages: + - python>=3.9,<3.12 run_python_cuspatial: common: - output_types: [conda, requirements, pyproject] packages: - geopandas>=0.11.0 + - &numpy numpy>=1.23,<2.0a0 test_python_cuspatial: common: - output_types: [conda, requirements, pyproject] @@ -342,6 +347,7 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: + - *numpy - pytest - pytest-cov - pytest-xdist @@ -354,7 +360,7 @@ dependencies: common: - output_types: conda packages: - - &rmm_conda rmm==24.4.* + - &rmm_conda rmm==24.6.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -365,17 +371,17 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - rmm-cu12==24.4.* + - rmm-cu12==24.6.* - matrix: {cuda: "11.*"} packages: - - rmm-cu11==24.4.* + - rmm-cu11==24.6.* - {matrix: null, packages: [*rmm_conda]} depends_on_cudf: common: - output_types: conda packages: - - &cudf_conda cudf==24.4.* + - &cudf_conda cudf==24.6.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -386,17 +392,17 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cudf-cu12==24.4.* + - cudf-cu12==24.6.* - matrix: {cuda: "11.*"} packages: - - cudf-cu11==24.4.* + - cudf-cu11==24.6.* - {matrix: null, packages: [*cudf_conda]} depends_on_cuml: common: - output_types: conda packages: - - &cuml_conda cuml==24.4.* + - &cuml_conda cuml==24.6.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -407,17 +413,17 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cuml-cu12==24.4.* + - cuml-cu12==24.6.* - matrix: {cuda: "11.*"} packages: - - cuml-cu11==24.4.* + - cuml-cu11==24.6.* - {matrix: null, packages: [*cuml_conda]} depends_on_cuspatial: common: - output_types: conda packages: - - &cuspatial_conda cuspatial==24.4.* + - &cuspatial_conda cuspatial==24.6.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -428,10 +434,10 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cuspatial-cu12==24.4.* + - cuspatial-cu12==24.6.* - matrix: {cuda: "11.*"} packages: - - cuspatial-cu11==24.4.* + - cuspatial-cu11==24.6.* - {matrix: null, packages: [*cuspatial_conda]} depends_on_cupy: diff --git a/docs/cuproj/source/conf.py b/docs/cuproj/source/conf.py index 06cdfac0e..f11b5bd82 100644 --- a/docs/cuproj/source/conf.py +++ b/docs/cuproj/source/conf.py @@ -1,10 +1,14 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' +from packaging.version import Version + +import cuproj + # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. @@ -49,10 +53,11 @@ # |version| and |release|, also used in various other places throughout the # built documents. # +CUPROJ_VERSION = Version(cuproj.__version__) # The short X.Y version. -version = '24.04' +version = f"{CUPROJ_VERSION.major:02}.{CUPROJ_VERSION.minor:02}" # The full version, including alpha/beta/rc tags. -release = '24.04.00' +release = f"{CUPROJ_VERSION.major:02}.{CUPROJ_VERSION.minor:02}.{CUPROJ_VERSION.micro:02}" # 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 a319082b4..8dd25cb28 100644 --- a/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb +++ b/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb @@ -45,7 +45,7 @@ "metadata": {}, "outputs": [], "source": [ - "# !conda create -n rapids-24.04 --solver=libmamba -c rapidsai -c conda-forge -c nvidia \\ \n", + "# !conda create -n rapids-24.06 --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 791d59308..569ce8806 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,10 +1,14 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' +from packaging.version import Version + +import cuspatial + # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. @@ -49,10 +53,11 @@ # |version| and |release|, also used in various other places throughout the # built documents. # +CUSPATIAL_VERSION = Version(cuspatial.__version__) # The short X.Y version. -version = '24.04' +version = f"{CUSPATIAL_VERSION.major:02}.{CUSPATIAL_VERSION.minor:02}" # The full version, including alpha/beta/rc tags. -release = '24.04.00' +release = f"{CUSPATIAL_VERSION.major:02}.{CUSPATIAL_VERSION.minor:02}.{CUSPATIAL_VERSION.micro:02}" # 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 4ec66b4b8..a20b8cf1e 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-24.04 -c rapidsai -c conda-forge -c nvidia \\ \n", - "# cuspatial=24.04 python=3.9 cudatoolkit=11.5 " + "# !conda create -n rapids-24.06 -c rapidsai -c conda-forge -c nvidia \\ \n", + "# cuspatial=24.06 python=3.9 cudatoolkit=11.5 " ] }, { diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake deleted file mode 100644 index f67ba4491..000000000 --- a/fetch_rapids.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# ============================================================================= -# Copyright (c) 2018-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. -# ============================================================================= -if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake) - file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.04/RAPIDS.cmake - ${CMAKE_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake - ) -endif() -include(${CMAKE_BINARY_DIR}/CUSPATIAL_RAPIDS.cmake) diff --git a/java/src/main/native/CMakeLists.txt b/java/src/main/native/CMakeLists.txt index 071f0ca37..b02e201d5 100755 --- a/java/src/main/native/CMakeLists.txt +++ b/java/src/main/native/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2019-2020, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ #============================================================================= cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -include(../../../../fetch_rapids.cmake) +include(../../../../rapids_config.cmake) # TODO: The logic for setting the architectures was previously not here. Was # that just an oversight, or is there a reason not to include this here? diff --git a/python/cuproj/CMakeLists.txt b/python/cuproj/CMakeLists.txt index 76dd5c814..2f7b743b0 100644 --- a/python/cuproj/CMakeLists.txt +++ b/python/cuproj/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, 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 @@ -14,15 +14,13 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(cuproj_version 24.04.00) - -include(../../fetch_rapids.cmake) +include(../../rapids_config.cmake) include(rapids-cuda) rapids_cuda_init_architectures(cuproj-python) project( cuproj-python - VERSION ${cuproj_version} + VERSION "${RAPIDS_VERSION}" LANGUAGES CXX CUDA) option(FIND_CUPROJ_CPP "Search for existing cuproj C++ installations before defaulting to local files" @@ -30,7 +28,7 @@ option(FIND_CUPROJ_CPP "Search for existing cuproj C++ installations before defa # If the user requested it we attempt to find cuproj. if(FIND_CUPROJ_CPP) - find_package(cuproj ${cuproj_version}) + find_package(cuproj "${RAPIDS_VERSION}") else() set(cuproj_FOUND OFF) endif() diff --git a/python/cuproj/cuproj/cuprojshim/CMakeLists.txt b/python/cuproj/cuproj/cuprojshim/CMakeLists.txt index 57f2abeab..00769965f 100644 --- a/python/cuproj/cuproj/cuprojshim/CMakeLists.txt +++ b/python/cuproj/cuproj/cuprojshim/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, 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 @@ -14,9 +14,7 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(cuproj_version 24.04.00) - -include(../../../../fetch_rapids.cmake) +include(../../../../rapids_config.cmake) include(rapids-cmake) include(rapids-cpm) include(rapids-cuda) @@ -26,7 +24,7 @@ rapids_cuda_init_architectures(CUPROJSHIM) project( CUPROJSHIM - VERSION ${cuproj_version} + VERSION "${RAPIDS_VERSION}" LANGUAGES CXX CUDA) diff --git a/python/cuproj/pyproject.toml b/python/cuproj/pyproject.toml index e033672b8..847d03206 100644 --- a/python/cuproj/pyproject.toml +++ b/python/cuproj/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ requires = [ "cmake>=3.26.4", "cython>=3.0.0", "ninja", - "rmm==24.4.*", + "rmm==24.6.*", "scikit-build-core[pyproject]>=0.7.0", "setuptools", "wheel", @@ -34,7 +34,7 @@ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ "cupy-cuda11x>=12.0.0", - "rmm==24.4.*", + "rmm==24.6.*", ] # 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", @@ -44,12 +44,14 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] [project.optional-dependencies] test = [ - "cuspatial==24.4.*", + "cuspatial==24.6.*", "geopandas>=0.11.0", + "numpy>=1.23,<2.0a0", "pyproj>=3.6.0,<3.7a0", "pytest", "pytest-cov", diff --git a/python/cuspatial/CMakeLists.txt b/python/cuspatial/CMakeLists.txt index 92126b90f..e3678c311 100644 --- a/python/cuspatial/CMakeLists.txt +++ b/python/cuspatial/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, 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 @@ -14,15 +14,13 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(cuspatial_version 24.04.00) - -include(../../fetch_rapids.cmake) +include(../../rapids_config.cmake) include(rapids-cuda) rapids_cuda_init_architectures(cuspatial-python) project( cuspatial-python - VERSION ${cuspatial_version} + VERSION "${RAPIDS_VERSION}" LANGUAGES CXX CUDA) option(FIND_CUSPATIAL_CPP "Search for existing cuspatial C++ installations before defaulting to local files" @@ -30,7 +28,7 @@ option(FIND_CUSPATIAL_CPP "Search for existing cuspatial C++ installations befor # If the user requested it we attempt to find cuspatial. if(FIND_CUSPATIAL_CPP) - find_package(cuspatial ${cuspatial_version}) + find_package(cuspatial "${RAPIDS_VERSION}") else() set(cuspatial_FOUND OFF) endif() diff --git a/python/cuspatial/benchmarks/api/bench_api.py b/python/cuspatial/benchmarks/api/bench_api.py index d93e45ebb..d8e24cf33 100644 --- a/python/cuspatial/benchmarks/api/bench_api.py +++ b/python/cuspatial/benchmarks/api/bench_api.py @@ -1,4 +1,6 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. +import pathlib + import cupy import geopandas import pytest @@ -223,12 +225,16 @@ def bench_quadtree_point_to_nearest_linestring(benchmark): SCALE = 3 MAX_DEPTH = 7 MIN_SIZE = 125 - host_countries = geopandas.read_file( - geopandas.datasets.get_path("naturalearth_lowres") - ) - host_cities = geopandas.read_file( - geopandas.datasets.get_path("naturalearth_cities") + data_dir = ( + pathlib.Path(__file__).parent.parent.parent + / "cuspatial" + / "tests" + / "data" ) + naturalearth_lowres = data_dir / "naturalearth_lowres.shp" + naturalearth_cities = data_dir / "naturalearth_cities.shp" + host_countries = geopandas.read_file(naturalearth_lowres) + host_cities = geopandas.read_file(naturalearth_cities) gpu_countries = cuspatial.from_geopandas( host_countries[host_countries["geometry"].type == "Polygon"] ) diff --git a/python/cuspatial/cuspatial/core/binops/distance_dispatch.py b/python/cuspatial/cuspatial/core/binops/distance_dispatch.py index c19953107..db2e6339b 100644 --- a/python/cuspatial/cuspatial/core/binops/distance_dispatch.py +++ b/python/cuspatial/cuspatial/core/binops/distance_dispatch.py @@ -1,5 +1,5 @@ import cudf -from cudf.core.column import as_column, full +from cudf.core.column import as_column from cuspatial._lib.distance import ( pairwise_linestring_distance, @@ -185,10 +185,11 @@ def __call__(self): # Rows with misaligned indices contains nan. Here we scatter the # distance values to the correct indices. - result = full( - len(self._res_index), + result = as_column( float("nan"), + length=len(self._res_index), dtype="float64", + nan_as_null=False, ) scatter_map = as_column( range(len(self._res_index)), dtype="int32" diff --git a/python/cuspatial/cuspatial/core/binpreds/basic_predicates.py b/python/cuspatial/cuspatial/core/binpreds/basic_predicates.py index 85438fefa..3ea4ed7dd 100644 --- a/python/cuspatial/cuspatial/core/binpreds/basic_predicates.py +++ b/python/cuspatial/cuspatial/core/binpreds/basic_predicates.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. import cudf @@ -67,7 +67,7 @@ def _basic_intersects_count(lhs, rhs): is_degenerate = _multipoints_is_degenerate(intersections) # If all the points in the intersection are in the rhs if len(is_degenerate) > 0: - sizes[is_degenerate] = 1 + sizes[is_degenerate] = sizes.dtype.type(1) return sizes diff --git a/python/cuspatial/cuspatial/core/binpreds/contains_geometry_processor.py b/python/cuspatial/cuspatial/core/binpreds/contains_geometry_processor.py index 8a1996613..8ff5dd659 100644 --- a/python/cuspatial/cuspatial/core/binpreds/contains_geometry_processor.py +++ b/python/cuspatial/cuspatial/core/binpreds/contains_geometry_processor.py @@ -1,10 +1,8 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. import cupy as cp import cudf -from cudf.core.dataframe import DataFrame -from cudf.core.series import Series from cuspatial.core._column.geocolumn import GeoColumn from cuspatial.core.binpreds.binpred_interface import ( @@ -117,7 +115,7 @@ def _convert_quadtree_result_from_part_to_polygon_indices( ["polygon_index", "point_index"] ] - def _reindex_allpairs(self, lhs, op_result) -> DataFrame: + def _reindex_allpairs(self, lhs, op_result) -> cudf.DataFrame: """Prepare the allpairs result of a contains_properly call as the first step of postprocessing. An allpairs result is reindexed by replacing the polygon index with the original index of the @@ -154,7 +152,7 @@ def _reindex_allpairs(self, lhs, op_result) -> DataFrame: # Replace the polygon index with the original index allpairs_result["polygon_index"] = allpairs_result[ "polygon_index" - ].replace(Series(lhs.index, index=cp.arange(len(lhs.index)))) + ].replace(cudf.Series(lhs.index, index=cp.arange(len(lhs.index)))) return allpairs_result @@ -202,7 +200,7 @@ def _postprocess_multipoint_rhs( point_indices = preprocessor_result.point_indices allpairs_result = self._reindex_allpairs(lhs, op_result) - if isinstance(allpairs_result, Series): + if isinstance(allpairs_result, cudf.Series): return allpairs_result # Hits is the number of calculated points in each polygon # Expected count is the sizes of the features in the right-hand @@ -233,6 +231,7 @@ def _postprocess_multipoint_rhs( return count_result hits = result_df["point_index_x"] hits.index = count_result.iloc[result_df["rhs_index"]].index + count_result = count_result.astype(hits.dtype) count_result.iloc[result_df["rhs_index"]] = hits return count_result diff --git a/python/cuspatial/cuspatial/core/geoseries.py b/python/cuspatial/cuspatial/core/geoseries.py index 64a977ec5..acf472749 100644 --- a/python/cuspatial/cuspatial/core/geoseries.py +++ b/python/cuspatial/cuspatial/core/geoseries.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION +# Copyright (c) 2020-2024, NVIDIA CORPORATION from functools import cached_property from numbers import Integral @@ -660,15 +660,15 @@ def _align_to_index( index, how, sort, allow_non_unique ) ).astype("int32") - aligned_union_offsets[ - aligned_union_offsets.isna() - ] = Feature_Enum.NONE.value + aligned_union_offsets[aligned_union_offsets.isna()] = np.int32( + Feature_Enum.NONE.value + ) aligned_input_types = self._column._meta.input_types._align_to_index( index, how, sort, allow_non_unique ).astype("int8") - aligned_input_types[ - aligned_input_types.isna() - ] = Feature_Enum.NONE.value + aligned_input_types[aligned_input_types.isna()] = np.int8( + Feature_Enum.NONE.value + ) column = GeoColumn( ( self._column.points, diff --git a/python/cuspatial/cuspatial/tests/conftest.py b/python/cuspatial/cuspatial/tests/conftest.py index 7b6ae2d1b..caa53dcea 100644 --- a/python/cuspatial/cuspatial/tests/conftest.py +++ b/python/cuspatial/cuspatial/tests/conftest.py @@ -1,4 +1,5 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. +import pathlib import geopandas as gpd import numpy as np @@ -308,13 +309,18 @@ def factory(length): @pytest.fixture -def naturalearth_cities(): - return gpd.read_file(gpd.datasets.get_path("naturalearth_cities")) +def data_dir(): + return pathlib.Path(__file__).parent / "data" @pytest.fixture -def naturalearth_lowres(): - return gpd.read_file(gpd.datasets.get_path("naturalearth_lowres")) +def naturalearth_cities(data_dir): + return gpd.read_file(data_dir / "naturalearth_cities.shp") + + +@pytest.fixture +def naturalearth_lowres(data_dir): + return gpd.read_file(data_dir / "naturalearth_lowres.shp") @pytest.fixture(scope="session") diff --git a/python/cuspatial/cuspatial/tests/data/naturalearth_cities.shp b/python/cuspatial/cuspatial/tests/data/naturalearth_cities.shp new file mode 100644 index 000000000..a7bcefa0a Binary files /dev/null and b/python/cuspatial/cuspatial/tests/data/naturalearth_cities.shp differ diff --git a/python/cuspatial/cuspatial/tests/data/naturalearth_cities.shx b/python/cuspatial/cuspatial/tests/data/naturalearth_cities.shx new file mode 100644 index 000000000..ce83da735 Binary files /dev/null and b/python/cuspatial/cuspatial/tests/data/naturalearth_cities.shx differ diff --git a/python/cuspatial/cuspatial/tests/data/naturalearth_lowres.shp b/python/cuspatial/cuspatial/tests/data/naturalearth_lowres.shp new file mode 100644 index 000000000..5a3440b25 Binary files /dev/null and b/python/cuspatial/cuspatial/tests/data/naturalearth_lowres.shp differ diff --git a/python/cuspatial/cuspatial/tests/data/naturalearth_lowres.shx b/python/cuspatial/cuspatial/tests/data/naturalearth_lowres.shx new file mode 100644 index 000000000..275512f80 Binary files /dev/null and b/python/cuspatial/cuspatial/tests/data/naturalearth_lowres.shx differ diff --git a/python/cuspatial/cuspatial/tests/test_geocolumn_accessor.py b/python/cuspatial/cuspatial/tests/test_geocolumn_accessor.py index db074ae88..c4ec694b6 100644 --- a/python/cuspatial/cuspatial/tests/test_geocolumn_accessor.py +++ b/python/cuspatial/cuspatial/tests/test_geocolumn_accessor.py @@ -1,4 +1,4 @@ -# Copyright 2022 NVIDIA Corporation +# Copyright (c) 2022-2024, NVIDIA CORPORATION import cupy as cp import geopandas as gpd @@ -18,10 +18,10 @@ "range, expected", [[slice(0, 3), [0, 3, 4, 5]], [slice(3, 6), [0, 30, 40, 41]]], ) -def test_GeoColumnAccessor_polygon_offset(range, expected): - gpdf = cuspatial.from_geopandas( - gpd.read_file(gpd.datasets.get_path("naturalearth_lowres")) - ) +def test_GeoColumnAccessor_polygon_offset( + range, expected, naturalearth_lowres +): + gpdf = cuspatial.from_geopandas(naturalearth_lowres) shorter = gpdf[range]["geometry"] expected = cp.array(expected) got = shorter.polygons.geometry_offset diff --git a/python/cuspatial/cuspatial/tests/test_geodataframe.py b/python/cuspatial/cuspatial/tests/test_geodataframe.py index f49708cf8..718046c17 100644 --- a/python/cuspatial/cuspatial/tests/test_geodataframe.py +++ b/python/cuspatial/cuspatial/tests/test_geodataframe.py @@ -1,4 +1,6 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. +import sys + import geopandas as gpd import numpy as np import pandas as pd @@ -187,10 +189,9 @@ def test_interleaved_polygons(gpdf, polys): ) -def test_to_geopandas_with_geopandas_dataset(): - df = gpd.read_file(gpd.datasets.get_path("naturalearth_lowres")) - gdf = cuspatial.from_geopandas(df) - assert_eq_geo_df(df, gdf.to_geopandas()) +def test_to_geopandas_with_geopandas_dataset(naturalearth_lowres): + gdf = cuspatial.from_geopandas(naturalearth_lowres) + assert_eq_geo_df(naturalearth_lowres, gdf.to_geopandas()) def test_to_shapely_random(): @@ -320,14 +321,17 @@ def test_boolmask(gpdf, df_boolmask): assert_eq_geo_df(gi[df_boolmask], cugpdf_back[df_boolmask]) -def test_memory_usage(gs): +@pytest.mark.xfail( + sys.version_info.major >= 3 and sys.version_info.minor >= 11, + reason="Size discrepancies between Python versions. See " + "https://github.com/rapidsai/cuspatial/issues/1352", +) +def test_memory_usage(gs, data_dir): assert gs.memory_usage() == 224 - host_dataframe = gpd.read_file( - gpd.datasets.get_path("naturalearth_lowres") - ) + host_dataframe = gpd.read_file(data_dir / "naturalearth_lowres.shp") gpu_dataframe = cuspatial.from_geopandas(host_dataframe) # The df size is 8kb of cudf rows and 217kb of the geometry column - assert gpu_dataframe.memory_usage().sum() == 224945 + assert gpu_dataframe.memory_usage().sum() == 216793 def test_from_dict(): diff --git a/python/cuspatial/cuspatial/tests/test_geoseries.py b/python/cuspatial/cuspatial/tests/test_geoseries.py index a865049a8..6e97d037b 100644 --- a/python/cuspatial/cuspatial/tests/test_geoseries.py +++ b/python/cuspatial/cuspatial/tests/test_geoseries.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from enum import Enum from numbers import Integral @@ -27,7 +27,7 @@ np.random.seed(0) -class Test_Feature_Enum(Enum): +class Example_Feature_Enum(Enum): POINT = 0 MULTIPOINT = 1 LINESTRING = 2 @@ -54,7 +54,7 @@ def random_multipolygon(size): def generate_random_shapely_feature( - size: Integral, has_z: bool = False, obj_type: Test_Feature_Enum = None + size: Integral, has_z: bool = False, obj_type: Example_Feature_Enum = None ): obj_type = obj_type.value if obj_type else np.random.randint(1, 7) if obj_type == 1: @@ -78,7 +78,7 @@ def generate_random_shapely_feature( return random_multipolygon(size) -def generator(size: Integral, obj_type: Test_Feature_Enum = None): +def generator(size: Integral, obj_type: Example_Feature_Enum = None): geos_list = [] for i in range(size): geo = generate_random_shapely_feature(3, obj_type) @@ -257,7 +257,7 @@ def test_getitem_lines(): def test_getitem_slice_same_index(): - gps = gpd.GeoSeries(generator(3, Test_Feature_Enum.POINT)) + gps = gpd.GeoSeries(generator(3, Example_Feature_Enum.POINT)) cus = cuspatial.from_geopandas(gps) assert_eq_geo(cus[0:1].to_geopandas(), gps[0:1]) assert_eq_geo(cus[0:1].to_geopandas(), gps[0:1]) @@ -551,11 +551,8 @@ def test_memory_usage_simple(gs): assert cugs.memory_usage() == 1616 -def test_memory_usage_large(): - host_dataframe = gpd.read_file( - gpd.datasets.get_path("naturalearth_lowres") - ) - geometry = cuspatial.from_geopandas(host_dataframe)["geometry"] +def test_memory_usage_large(naturalearth_lowres): + geometry = cuspatial.from_geopandas(naturalearth_lowres)["geometry"] # the geometry column from naturalearth_lowres is 217kb of coordinates assert geometry.memory_usage() == 216793 diff --git a/python/cuspatial/cuspatial/utils/binpred_utils.py b/python/cuspatial/cuspatial/utils/binpred_utils.py index 5a1a0fb0b..c8e2804eb 100644 --- a/python/cuspatial/cuspatial/utils/binpred_utils.py +++ b/python/cuspatial/cuspatial/utils/binpred_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. import cupy as cp import numpy as np @@ -363,7 +363,7 @@ def _points_and_lines_to_multipoints(geoseries, offsets): points = geoseries[points_mask] lines = geoseries[lines_mask] points_offsets = _zero_series(len(geoseries)) - points_offsets[points_mask] = 1 + points_offsets[points_mask] = points_offsets.dtype.type(1) lines_series = geoseries[lines_mask] lines_sizes = lines_series.sizes xy = _zero_series(len(points.points.xy) + len(lines.lines.xy)) @@ -372,9 +372,10 @@ def _points_and_lines_to_multipoints(geoseries, offsets): lines_sizes.index = points_offsets[lines_mask].index points_offsets[lines_mask] = lines_series.sizes.values sizes[lines_mask] = lines.sizes.values * 2 - sizes[points_mask] = 2 + sizes[points_mask] = sizes.dtype.type(2) # TODO Inevitable host device copy points_xy_mask = cp.array(np.repeat(points_mask, sizes.values_host)) + xy = xy.astype(points.points.xy.dtype) xy.iloc[points_xy_mask] = points.points.xy.reset_index(drop=True) xy.iloc[~points_xy_mask] = lines.lines.xy.reset_index(drop=True) collected_offsets = cudf.concat( @@ -446,6 +447,7 @@ def _pli_features_rebuild_offsets(pli, features): # Recompute the offsets for the new series grouped_sizes = in_sizes.groupby(level=0).sum().sort_index() out_sizes = _zero_series(len(pli[0]) - 1) + out_sizes = out_sizes.astype(grouped_sizes.dtype) out_sizes.iloc[grouped_sizes.index] = grouped_sizes offsets = cudf.concat([cudf.Series([0]), out_sizes.cumsum()]) return offsets diff --git a/python/cuspatial/pyproject.toml b/python/cuspatial/pyproject.toml index bc6901689..b4ae45e9e 100644 --- a/python/cuspatial/pyproject.toml +++ b/python/cuspatial/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,10 +16,10 @@ build-backend = "scikit_build_core.build" requires = [ "cmake>=3.26.4", - "cudf==24.4.*", + "cudf==24.6.*", "cython>=3.0.0", "ninja", - "rmm==24.4.*", + "rmm==24.6.*", "scikit-build-core[pyproject]>=0.7.0", "setuptools", "wheel", @@ -36,9 +36,10 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cudf==24.4.*", + "cudf==24.6.*", "geopandas>=0.11.0", - "rmm==24.4.*", + "numpy>=1.23,<2.0a0", + "rmm==24.6.*", ] # 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", @@ -48,6 +49,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] [project.optional-dependencies] @@ -118,3 +120,13 @@ wheel.packages = ["cuspatial"] provider = "scikit_build_core.metadata.regex" input = "cuspatial/VERSION" regex = "(?P.*)" + +[tool.pytest.ini_options] +xfail_strict = true +filterwarnings = [ + "error:::cudf", + "error::FutureWarning", + "error::DeprecationWarning", + # https://github.com/pytest-dev/pytest-cov/issues/557 + "ignore:The --rsyncdir command line argument:DeprecationWarning", +] diff --git a/rapids_config.cmake b/rapids_config.cmake new file mode 100644 index 000000000..40207b870 --- /dev/null +++ b/rapids_config.cmake @@ -0,0 +1,36 @@ +# ============================================================================= +# Copyright (c) 2018-2024, 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. +# ============================================================================= +file(READ "${CMAKE_CURRENT_LIST_DIR}/VERSION" _rapids_version) +if(_rapids_version MATCHES [[^([0-9][0-9])\.([0-9][0-9])\.([0-9][0-9])]]) + set(RAPIDS_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(RAPIDS_VERSION_MINOR "${CMAKE_MATCH_2}") + set(RAPIDS_VERSION_PATCH "${CMAKE_MATCH_3}") + set(RAPIDS_VERSION_MAJOR_MINOR "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}") + set(RAPIDS_VERSION "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}.${RAPIDS_VERSION_PATCH}") +else() + string(REPLACE "\n" "\n " _rapids_version_formatted " ${_rapids_version}") + message( + FATAL_ERROR + "Could not determine RAPIDS version. Contents of VERSION file:\n${_rapids_version_formatted}" + ) +endif() + +if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS-${RAPIDS_VERSION_MAJOR_MINOR}.cmake") + file( + DOWNLOAD + "https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-${RAPIDS_VERSION_MAJOR_MINOR}/RAPIDS.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS-${RAPIDS_VERSION_MAJOR_MINOR}.cmake" + ) +endif() +include("${CMAKE_CURRENT_BINARY_DIR}/CUSPATIAL_RAPIDS-${RAPIDS_VERSION_MAJOR_MINOR}.cmake")