diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json index 5e203a384..d94ac9815 100644 --- a/.devcontainer/cuda11.8-conda/devcontainer.json +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -5,17 +5,17 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "conda", - "BASE": "rapidsai/devcontainers:24.06-cpp-cuda11.8-mambaforge-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.08-cpp-cuda11.8-mambaforge-ubuntu22.04" } }, "runArgs": [ "--rm", "--name", - "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda11.8-conda" + "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.08-cuda11.8-conda" ], "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.8": {} }, "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 682b2d155..c195f471d 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -5,17 +5,17 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "pip", - "BASE": "rapidsai/devcontainers:24.06-cpp-cuda11.8-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.08-cpp-cuda11.8-ubuntu22.04" } }, "runArgs": [ "--rm", "--name", - "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda11.8-pip" + "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.08-cuda11.8-pip" ], "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.8": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda12.2-conda/devcontainer.json b/.devcontainer/cuda12.2-conda/devcontainer.json index d3bd5b769..c714f926d 100644 --- a/.devcontainer/cuda12.2-conda/devcontainer.json +++ b/.devcontainer/cuda12.2-conda/devcontainer.json @@ -5,17 +5,17 @@ "args": { "CUDA": "12.2", "PYTHON_PACKAGE_MANAGER": "conda", - "BASE": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.08-cpp-mambaforge-ubuntu22.04" } }, "runArgs": [ "--rm", "--name", - "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-conda" + "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.08-cuda12.2-conda" ], "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.8": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda12.2-pip/devcontainer.json b/.devcontainer/cuda12.2-pip/devcontainer.json index a667a3fd0..6f3f09224 100644 --- a/.devcontainer/cuda12.2-pip/devcontainer.json +++ b/.devcontainer/cuda12.2-pip/devcontainer.json @@ -5,17 +5,17 @@ "args": { "CUDA": "12.2", "PYTHON_PACKAGE_MANAGER": "pip", - "BASE": "rapidsai/devcontainers:24.06-cpp-cuda12.2-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.08-cpp-cuda12.2-ubuntu22.04" } }, "runArgs": [ "--rm", "--name", - "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-pip" + "${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.08-cuda12.2-pip" ], "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.8": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 06cb83f7d..b5e2dbb44 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index be33cfd04..584e65f87 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.06 + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.08 checks: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.06 + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.08 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -78,34 +78,34 @@ jobs: wheel-build-cuspatial: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.08 with: arch: '["amd64"]' cuda: '["12.2"]' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 00312c6a0..f00545fd9 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.08 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.06 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.08 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7e8b254..264cef755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +# cuspatial 24.06.00 (5 Jun 2024) + +## 🚨 Breaking Changes + +- Replace rmm::mr::device_memory_resource* with rmm::device_async_resource_ref ([#1373](https://github.com/rapidsai/cuspatial/pull/1373)) [@harrism](https://github.com/harrism) + +## 🐛 Bug Fixes + +- create conda ci test env in one step ([#1387](https://github.com/rapidsai/cuspatial/pull/1387)) [@msarahan](https://github.com/msarahan) + +## 🛠️ Improvements + +- Fix up imports for cudf changes ([#1383](https://github.com/rapidsai/cuspatial/pull/1383)) [@vyasr](https://github.com/vyasr) +- Fix building cuspatial with CCCL main ([#1382](https://github.com/rapidsai/cuspatial/pull/1382)) [@trxcllnt](https://github.com/trxcllnt) +- Fix quadtree spatial join OOMs on large numbers of input polygons ([#1381](https://github.com/rapidsai/cuspatial/pull/1381)) [@trxcllnt](https://github.com/trxcllnt) +- Enable warnings-as-errors for cuproj tests ([#1379](https://github.com/rapidsai/cuspatial/pull/1379)) [@mroeschke](https://github.com/mroeschke) +- Always use a static gtest and gbench ([#1377](https://github.com/rapidsai/cuspatial/pull/1377)) [@trxcllnt](https://github.com/trxcllnt) +- Migrate to `{{ stdlib("c") }}` ([#1376](https://github.com/rapidsai/cuspatial/pull/1376)) [@hcho3](https://github.com/hcho3) +- add --rm and --name to devcontainer run args ([#1375](https://github.com/rapidsai/cuspatial/pull/1375)) [@trxcllnt](https://github.com/trxcllnt) +- Replace rmm::mr::device_memory_resource* with rmm::device_async_resource_ref ([#1373](https://github.com/rapidsai/cuspatial/pull/1373)) [@harrism](https://github.com/harrism) +- Enable all tests for `arm` jobs ([#1365](https://github.com/rapidsai/cuspatial/pull/1365)) [@galipremsagar](https://github.com/galipremsagar) +- Enable pytest failures on warnings on FutureWarnings (Replace deprecated `geopandas.dataset` module) ([#1360](https://github.com/rapidsai/cuspatial/pull/1360)) [@mroeschke](https://github.com/mroeschke) +- Fix `JOIN_POINT_IN_POLYGON_LARGE_TEST_EXP` test ([#1346](https://github.com/rapidsai/cuspatial/pull/1346)) [@trxcllnt](https://github.com/trxcllnt) + # cuSpatial 24.04.00 (10 Apr 2024) ## 🐛 Bug Fixes diff --git a/README.md b/README.md index 6a6bef576..955ee3f45 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ An example command from the Release Selector: docker run --gpus all --pull always --rm -it \ --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \ -p 8888:8888 -p 8787:8787 -p 8786:8786 \ - nvcr.io/nvidia/rapidsai/notebooks:24.06-cuda11.8-py3.10 + nvcr.io/nvidia/rapidsai/notebooks:24.08-cuda11.8-py3.10 ``` ### Install with Conda @@ -126,7 +126,7 @@ cuSpatial can be installed with conda (miniconda, or the full Anaconda distribut ```shell conda install -c rapidsai -c conda-forge -c nvidia \ - cuspatial=24.06 python=3.11 cudatoolkit=11.8 + cuspatial=24.08 python=3.11 cudatoolkit=11.8 ``` We also provide nightly Conda packages built from the HEAD of our latest development branch. @@ -185,7 +185,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.06, +@misc{cuspatial:24.08, author = {{NVIDIA Corporation}}, title = {cuSpatial: GPU-Accelerated Geospatial and Spatiotemporal Algorithms}, year = {2023}, diff --git a/VERSION b/VERSION index 0bff6981a..ec8489fda 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.06.00 +24.08.00 diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 15eb639a0..27c2270ea 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -6,30 +6,24 @@ set -euo pipefail rapids-logger "Create test conda environment" . /opt/conda/etc/profile.d/conda.sh +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL="$(rapids-download-conda-from-s3 cpp)" +PYTHON_CHANNEL="$(rapids-download-conda-from-s3 python)" + rapids-dependency-file-generator \ --output conda \ --file_key docs \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ + --prepend-channel "${CPP_CHANNEL}" --prepend-channel "${PYTHON_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n docs conda activate docs rapids-print-env -rapids-logger "Downloading artifacts from previous jobs" -CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - -rapids-mamba-retry install \ - --channel "${CPP_CHANNEL}" \ - --channel "${PYTHON_CHANNEL}" \ - libcuspatial \ - cuspatial \ - cuproj - export RAPIDS_VERSION="$(rapids-version)" export RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)" -export RAPIDS_VERSION_NUMBER="24.06" +export RAPIDS_VERSION_NUMBER="24.08" export RAPIDS_DOCS_DIR="$(mktemp -d)" rapids-logger "Build cuSpatial CPP docs" diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 5392183dc..ae13d7629 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -45,7 +45,10 @@ NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; prin DEPENDENCIES=( cudf cuml + cuspatial libcudf + libcuspatial + libcuspatial-tests librmm rmm cuspatial diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index 35a981e93..0f0a09ef1 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -5,11 +5,16 @@ set -euo pipefail . /opt/conda/etc/profile.d/conda.sh + +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) + rapids-logger "Generate C++ testing dependencies" rapids-dependency-file-generator \ --output conda \ - --file_key test_cpp \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml + --file-key test_cpp \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \ + --prepend-channel "${CPP_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test @@ -18,7 +23,6 @@ set +u conda activate test set -u -CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/ mkdir -p "${RAPIDS_TESTS_DIR}" @@ -27,10 +31,6 @@ export CUSPATIAL_HOME="${PWD}" rapids-print-env -rapids-mamba-retry install \ - --channel "${CPP_CHANNEL}" \ - libcuspatial libcuspatial-tests - rapids-logger "Check GPU usage" nvidia-smi diff --git a/ci/test_notebooks.sh b/ci/test_notebooks.sh index a4ae9c21c..61ae4f194 100755 --- a/ci/test_notebooks.sh +++ b/ci/test_notebooks.sh @@ -5,11 +5,16 @@ set -euo pipefail . /opt/conda/etc/profile.d/conda.sh +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) + rapids-logger "Generate notebook testing dependencies" rapids-dependency-file-generator \ --output conda \ - --file_key test_notebooks \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + --file-key test_notebooks \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ + --prepend-channel "${CPP_CHANNEL}" --prepend-channel "${PYTHON_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test @@ -20,15 +25,6 @@ set -u rapids-print-env -rapids-logger "Downloading artifacts from previous jobs" -CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - -rapids-mamba-retry install \ - --channel "${CPP_CHANNEL}" \ - --channel "${PYTHON_CHANNEL}" \ - cuspatial libcuspatial cuproj - NBTEST="$(realpath "$(dirname "$0")/utils/nbtest.sh")" pushd notebooks diff --git a/ci/test_python.sh b/ci/test_python.sh index c6b80ed45..9a7cada37 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -5,11 +5,16 @@ set -euo pipefail . /opt/conda/etc/profile.d/conda.sh +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) + rapids-logger "Generate Python testing dependencies" rapids-dependency-file-generator \ --output conda \ - --file_key test_python \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + --file-key test_python \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ + --prepend-channel "${CPP_CHANNEL}" --prepend-channel "${PYTHON_CHANNEL}" | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test @@ -18,10 +23,6 @@ set +u conda activate test set -u -rapids-logger "Downloading artifacts from previous jobs" -CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"} mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}" @@ -31,11 +32,6 @@ export CUSPATIAL_HOME="${PWD}" rapids-print-env -rapids-mamba-retry install \ - --channel "${CPP_CHANNEL}" \ - --channel "${PYTHON_CHANNEL}" \ - libcuspatial cuspatial cuproj - rapids-logger "Check GPU usage" nvidia-smi diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 1ec5a27e3..9868e1917 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.6.* -- cuml==24.6.* +- cudf==24.8.* +- cuml==24.8.* - cupy>=12.0.0 - curl - cxx-compiler @@ -22,8 +22,10 @@ dependencies: - geopandas>=0.11.0 - ipython - ipywidgets -- libcudf==24.6.* -- librmm==24.6.* +- libcudf==24.8.* +- libcuspatial-tests==24.8.* +- libcuspatial==24.8.* +- librmm==24.8.* - myst-parser - nbsphinx - ninja @@ -39,7 +41,7 @@ dependencies: - pytest-cov - pytest-xdist - python>=3.9,<3.12 -- rmm==24.6.* +- rmm==24.8.* - 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 9619b19fb..4951df0ba 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.6.* -- cuml==24.6.* +- cudf==24.8.* +- cuml==24.8.* - cupy>=12.0.0 - curl - cxx-compiler @@ -25,8 +25,10 @@ dependencies: - geopandas>=0.11.0 - ipython - ipywidgets -- libcudf==24.6.* -- librmm==24.6.* +- libcudf==24.8.* +- libcuspatial-tests==24.8.* +- libcuspatial==24.8.* +- librmm==24.8.* - myst-parser - nbsphinx - ninja @@ -41,7 +43,7 @@ dependencies: - pytest-cov - pytest-xdist - python>=3.9,<3.12 -- rmm==24.6.* +- rmm==24.8.* - scikit-build-core>=0.7.0 - scikit-image - shapely diff --git a/conda/recipes/cuproj/meta.yaml b/conda/recipes/cuproj/meta.yaml index 4721daefb..d65a983c6 100644 --- a/conda/recipes/cuproj/meta.yaml +++ b/conda/recipes/cuproj/meta.yaml @@ -63,7 +63,6 @@ requirements: - python - rmm ={{ minor_version }} - scikit-build-core >=0.7.0 - - setuptools - proj - sqlite run: diff --git a/conda/recipes/cuspatial/meta.yaml b/conda/recipes/cuspatial/meta.yaml index 1bc68677f..b3ea40cb7 100644 --- a/conda/recipes/cuspatial/meta.yaml +++ b/conda/recipes/cuspatial/meta.yaml @@ -65,7 +65,6 @@ requirements: - python - rmm ={{ minor_version }} - scikit-build-core >=0.7.0 - - setuptools run: {% if cuda_major == "11" %} - cudatoolkit diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index 99780a677..10e626f3f 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2019-2021, 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. @@ -23,6 +23,17 @@ add_library(cuspatial_benchmark_common OBJECT target_compile_features(cuspatial_benchmark_common PUBLIC cxx_std_17 cuda_std_17) +set_target_properties(cuspatial_benchmark_common + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" + INSTALL_RPATH "\$ORIGIN/../../../lib" + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON + POSITION_INDEPENDENT_CODE ON + INTERFACE_POSITION_INDEPENDENT_CODE ON +) + target_link_libraries(cuspatial_benchmark_common PUBLIC benchmark::benchmark cudf::cudftestutil @@ -43,6 +54,10 @@ function(ConfigureBench CMAKE_BENCH_NAME) set_target_properties(${CMAKE_BENCH_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" INSTALL_RPATH "\$ORIGIN/../../../lib" + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON ) target_link_libraries(${CMAKE_BENCH_NAME} PRIVATE benchmark::benchmark_main cuspatial_benchmark_common) install( @@ -61,7 +76,11 @@ function(ConfigureNVBench CMAKE_BENCH_NAME) ${CMAKE_BENCH_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" INSTALL_RPATH "\$ORIGIN/../../../lib" - ) + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON +) target_link_libraries( ${CMAKE_BENCH_NAME} PRIVATE cuspatial_benchmark_common nvbench::main ) diff --git a/cpp/include/cuspatial/detail/index/construction/phase_2.cuh b/cpp/include/cuspatial/detail/index/construction/phase_2.cuh index 88c4947e0..df28ecca1 100644 --- a/cpp/include/cuspatial/detail/index/construction/phase_2.cuh +++ b/cpp/include/cuspatial/detail/index/construction/phase_2.cuh @@ -85,9 +85,9 @@ inline rmm::device_uvector flatten_point_keys( keys_and_levels + num_valid_nodes, flattened_keys.begin(), [last_level = max_depth - 1] __device__(auto const& val) { - bool is_parent{false}; - uint32_t key{}, level{}; - thrust::tie(key, level, is_parent) = val; + auto& key = thrust::get<0>(val); + auto& level = thrust::get<1>(val); + auto& is_parent = thrust::get<2>(val); // if this is a parent node, return max_key. otherwise // compute the key for one level up the tree. Leaf nodes // whose keys are zero will be removed in a subsequent diff --git a/cpp/include/cuspatial/detail/join/quadtree_point_in_polygon.cuh b/cpp/include/cuspatial/detail/join/quadtree_point_in_polygon.cuh index 0b8f23e19..68a2e9596 100644 --- a/cpp/include/cuspatial/detail/join/quadtree_point_in_polygon.cuh +++ b/cpp/include/cuspatial/detail/join/quadtree_point_in_polygon.cuh @@ -24,14 +24,16 @@ #include #include +#include #include #include #include #include +#include #include -#include +#include namespace cuspatial { namespace detail { @@ -57,7 +59,7 @@ struct compute_poly_and_point_indices { using IndexType = iterator_value_type; inline thrust::tuple __device__ - operator()(IndexType const global_index) const + operator()(std::uint64_t const global_index) const { auto const [quad_poly_index, local_point_index] = get_quad_and_local_point_indices(global_index, point_offsets_begin, point_offsets_end); @@ -118,16 +120,26 @@ std::pair, rmm::device_uvector> quadtr auto num_poly_quad_pairs = std::distance(poly_indices_first, poly_indices_last); - auto quad_lengths_iter = - thrust::make_permutation_iterator(quadtree.length_begin(), quad_indices_first); + // The quadtree length is an iterator of uint32_t, but we have to transform into uint64_t values + // so the thrust::inclusive_scan accumulates into uint64_t outputs. Changing the output iterator + // to uint64_t isn't sufficient to achieve this behavior. + auto quad_lengths_iter = thrust::make_transform_iterator( + thrust::make_permutation_iterator(quadtree.length_begin(), quad_indices_first), + cuda::proclaim_return_type([] __device__(IndexType const& i) -> std::uint64_t { + return static_cast(i); + })); auto quad_offsets_iter = thrust::make_permutation_iterator(quadtree.offset_begin(), quad_indices_first); - // Compute a "local" set of zero-based point offsets from number of points in each quadrant + // Compute a "local" set of zero-based point offsets from the number of points in each quadrant. + // // Use `num_poly_quad_pairs + 1` as the length so that the last element produced by // `inclusive_scan` is the total number of points to be tested against any polygon. - rmm::device_uvector local_point_offsets(num_poly_quad_pairs + 1, stream); + // + // Accumulate into uint64_t, because the prefix sums can overflow the size of uint32_t + // when testing a large number of polygons against a large quadtree. + rmm::device_uvector local_point_offsets(num_poly_quad_pairs + 1, stream); // inclusive scan of quad_lengths_iter thrust::inclusive_scan(rmm::exec_policy(stream), @@ -136,21 +148,27 @@ std::pair, rmm::device_uvector> quadtr local_point_offsets.begin() + 1); // Ensure local point offsets starts at 0 - IndexType init{0}; + std::uint64_t init{0}; local_point_offsets.set_element_async(0, init, stream); // The last element is the total number of points to test against any polygon. auto num_total_points = local_point_offsets.back_element(stream); - // Allocate the output polygon and point index pair vectors - rmm::device_uvector poly_indices(num_total_points, stream); - rmm::device_uvector point_indices(num_total_points, stream); - - auto poly_and_point_indices = - thrust::make_zip_iterator(poly_indices.begin(), point_indices.begin()); - - // Enumerate the point X/Ys using the sorted `point_indices` (from quadtree construction) - auto point_xys_iter = thrust::make_permutation_iterator(points_first, point_indices_first); + // The largest supported input size for thrust::count_if/copy_if is INT32_MAX. + // This functor iterates over the input space and processes up to INT32_MAX elements at a time. + std::uint64_t max_points_to_test = std::numeric_limits::max(); + auto count_in_chunks = [&](auto const& func) { + std::uint64_t memo{}; + for (std::uint64_t offset{0}; offset < num_total_points; offset += max_points_to_test) { + memo += func(memo, offset, std::min(max_points_to_test, num_total_points - offset)); + } + return memo; + }; + + detail::test_poly_point_intersection test_poly_point_pair{ + // Enumerate the point X/Ys using the sorted `point_indices` (from quadtree construction) + thrust::make_permutation_iterator(points_first, point_indices_first), + polygons}; // Compute the combination of polygon and point index pairs. For each polygon/quadrant pair, // enumerate pairs of (poly_index, point_index) for each point in each quadrant. @@ -163,28 +181,57 @@ std::pair, rmm::device_uvector> quadtr // pp_pairs.append((polygon, point)) // ``` // - auto global_to_poly_and_point_indices = detail::make_counting_transform_iterator( - 0, - detail::compute_poly_and_point_indices{quad_offsets_iter, - local_point_offsets.begin(), - local_point_offsets.end(), - poly_indices_first}); - - // Compute the number of intersections by removing (poly, point) pairs that don't intersect - auto num_intersections = thrust::distance( - poly_and_point_indices, - thrust::copy_if(rmm::exec_policy(stream), - global_to_poly_and_point_indices, - global_to_poly_and_point_indices + num_total_points, - poly_and_point_indices, - detail::test_poly_point_intersection{point_xys_iter, polygons})); - - poly_indices.resize(num_intersections, stream); - poly_indices.shrink_to_fit(stream); - point_indices.resize(num_intersections, stream); - point_indices.shrink_to_fit(stream); - - return std::pair{std::move(poly_indices), std::move(point_indices)}; + auto global_to_poly_and_point_indices = [&](auto offset = 0) { + return detail::make_counting_transform_iterator( + offset, + detail::compute_poly_and_point_indices{quad_offsets_iter, + local_point_offsets.begin(), + local_point_offsets.end(), + poly_indices_first}); + }; + + auto run_quadtree_point_in_polygon = [&](auto output_size) { + // Allocate the output polygon and point index pair vectors + rmm::device_uvector poly_indices(output_size, stream); + rmm::device_uvector point_indices(output_size, stream); + + auto num_intersections = count_in_chunks([&](auto memo, auto offset, auto size) { + auto poly_and_point_indices = + thrust::make_zip_iterator(poly_indices.begin(), point_indices.begin()) + memo; + // Remove (poly, point) pairs that don't intersect + return thrust::distance(poly_and_point_indices, + thrust::copy_if(rmm::exec_policy(stream), + global_to_poly_and_point_indices(offset), + global_to_poly_and_point_indices(offset) + size, + poly_and_point_indices, + test_poly_point_pair)); + }); + + if (num_intersections < output_size) { + poly_indices.resize(num_intersections, stream); + point_indices.resize(num_intersections, stream); + poly_indices.shrink_to_fit(stream); + point_indices.shrink_to_fit(stream); + } + + return std::pair{std::move(poly_indices), std::move(point_indices)}; + }; + + try { + // First attempt to run the hit test assuming allocating space for all possible intersections + // fits into the available memory. + return run_quadtree_point_in_polygon(num_total_points); + } catch (rmm::out_of_memory const&) { + // If we OOM the first time, pre-compute the number of hits and allocate only that amount of + // space for the output buffers. This halves performance, but it should at least return valid + // results. + return run_quadtree_point_in_polygon(count_in_chunks([&](auto memo, auto offset, auto size) { + return thrust::count_if(rmm::exec_policy(stream), + global_to_poly_and_point_indices(offset), + global_to_poly_and_point_indices(offset) + size, + test_poly_point_pair); + })); + } } } // namespace cuspatial diff --git a/cpp/include/cuspatial/detail/range/multilinestring_range.cuh b/cpp/include/cuspatial/detail/range/multilinestring_range.cuh index b9b53bfc0..03ad0fe27 100644 --- a/cpp/include/cuspatial/detail/range/multilinestring_range.cuh +++ b/cpp/include/cuspatial/detail/range/multilinestring_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. @@ -74,6 +74,7 @@ template +CUSPATIAL_HOST_DEVICE multilinestring_range::multilinestring_range( GeometryIterator geometry_begin, GeometryIterator geometry_end, diff --git a/cpp/include/cuspatial/geometry/box.hpp b/cpp/include/cuspatial/geometry/box.hpp index 1041c4de2..4a9f97639 100644 --- a/cpp/include/cuspatial/geometry/box.hpp +++ b/cpp/include/cuspatial/geometry/box.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. @@ -40,9 +40,9 @@ class alignas(sizeof(Vertex)) box { private: /** - * @brief Output stream operator for `vec_2d` for human-readable formatting + * @brief Output stream operator for `box` for human-readable formatting */ - friend std::ostream& operator<<(std::ostream& os, cuspatial::box const& b) + friend std::ostream& operator<<(std::ostream& os, cuspatial::box const& b) { return os << "{" << b.v1 << ", " << b.v2 << "}"; } diff --git a/cpp/include/cuspatial_test/geometry_generator.cuh b/cpp/include/cuspatial_test/geometry_generator.cuh index a3efa5812..8c17ff291 100644 --- a/cpp/include/cuspatial_test/geometry_generator.cuh +++ b/cpp/include/cuspatial_test/geometry_generator.cuh @@ -33,6 +33,8 @@ #include +#include + namespace cuspatial { namespace test { @@ -399,8 +401,9 @@ auto generate_multipoint_array(multipoint_generator_parameter params, std::size_t{0}, params.num_points_per_multipoints); - auto engine_x = deterministic_engine(params.num_points()); - auto engine_y = deterministic_engine(2 * params.num_points()); + auto golden_ratio = (1 + std::sqrt(T{5})) / 2; + auto engine_x = deterministic_engine(golden_ratio * params.num_points()); + auto engine_y = deterministic_engine((1 / golden_ratio) * params.num_points()); auto x_dist = make_uniform_dist(params.lower_left.x, params.upper_right.x); auto y_dist = make_uniform_dist(params.lower_left.y, params.upper_right.y); diff --git a/cpp/include/cuspatial_test/vector_factories.cuh b/cpp/include/cuspatial_test/vector_factories.cuh index a772cd6cf..9d3e8a31a 100644 --- a/cpp/include/cuspatial_test/vector_factories.cuh +++ b/cpp/include/cuspatial_test/vector_factories.cuh @@ -363,6 +363,17 @@ class multipoint_array { _geometry_offsets.begin(), _geometry_offsets.end(), _coordinates.begin(), _coordinates.end()}; } + /** + * @brief Copy the offset arrays to host. + */ + auto to_host() const + { + auto geometry_offsets = cuspatial::test::to_host(_geometry_offsets); + auto coordinate_offsets = cuspatial::test::to_host(_coordinates); + + return std::tuple{geometry_offsets, coordinate_offsets}; + } + /// Release ownership auto release() { return std::pair{std::move(_geometry_offsets), std::move(_coordinates)}; } diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 7f7cb112a..f6752c860 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -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. @@ -158,6 +158,9 @@ ConfigureTest(JOIN_POINT_IN_POLYGON_SMALL_TEST_EXP ConfigureTest(JOIN_POINT_IN_POLYGON_LARGE_TEST_EXP join/quadtree_point_in_polygon_test_large.cu) +ConfigureTest(JOIN_POINT_IN_POLYGON_OOM_TEST_EXP + join/quadtree_point_in_polygon_test_oom.cu) + ConfigureTest(JOIN_POINT_TO_LINESTRING_SMALL_TEST_EXP join/quadtree_point_to_nearest_linestring_test_small.cu) diff --git a/cpp/tests/join/quadtree_point_in_polygon_test_oom.cu b/cpp/tests/join/quadtree_point_in_polygon_test_oom.cu new file mode 100644 index 000000000..2f66918e0 --- /dev/null +++ b/cpp/tests/join/quadtree_point_in_polygon_test_oom.cu @@ -0,0 +1,140 @@ +/* + * 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 + * + * 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. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +/* + * The test uses the same quadtree structure as in pip_refine_test_small. However, the number of + * randomly generated points under all quadrants (min_size) are increased to be more than the + * number of threads per-block. + */ + +template +struct PIPRefineTestLarge : public cuspatial::test::BaseFixture {}; + +template +struct test_point_in_poly_functor { + cuspatial::multipolygon_range*> + polys; + __device__ inline T operator()(cuspatial::vec_2d point) + { + auto it = cuspatial::make_counting_transform_iterator(0, [&](auto i) { return polys[i][0]; }); + return thrust::count_if(thrust::seq, it, it + polys.num_multipolygons(), [&](auto poly) { + return cuspatial::is_point_in_polygon(point, poly); + }); + } +}; + +using TestTypes = ::testing::Types; + +TYPED_TEST_CASE(PIPRefineTestLarge, TestTypes); + +TYPED_TEST(PIPRefineTestLarge, TestOOM) +{ + using T = TypeParam; + using cuspatial::vec_2d; + using cuspatial::test::make_device_vector; + + using point_t = typename cuspatial::test::multipoint_array, + rmm::device_uvector>>; + + using polys_t = typename cuspatial::test::multipolygon_array, + rmm::device_uvector, + rmm::device_uvector, + rmm::device_uvector>>; + + vec_2d v_min{0.0, 0.0}; + vec_2d v_max{1'000.0, 1'000.0}; + T const scale{1.0}; + std::uint8_t const max_depth{15}; + std::uint32_t const min_size{10'000}; + + std::size_t const num_points{1'000'000}; + std::size_t const num_polys{24'000}; + + rmm::device_uvector> points = [&]() { + point_t points = cuspatial::test::generate_multipoint_array( + cuspatial::test::multipoint_generator_parameter{1, num_points, v_min, v_max}, + this->stream()); + return points.release().second; + }(); + + polys_t multipoly_array = cuspatial::test::generate_multipolygon_array( + cuspatial::test::multipolygon_generator_parameter{ + num_polys, + 1, + 0, + 4, + vec_2d{(v_max - v_min).x / 2, (v_max - v_min).y / 2}, + (v_max - v_min).x / 8}, + this->stream()); + + auto multipolygons = multipoly_array.range(); + + auto expected_size = thrust::count_if(rmm::exec_policy(this->stream()), + points.begin(), + points.end(), + test_point_in_poly_functor{multipolygons}); + + auto [point_indices, quadtree] = cuspatial::quadtree_on_points( + points.begin(), points.end(), v_min, v_max, scale, max_depth, min_size, this->stream()); + + auto bboxes = + rmm::device_uvector>(multipolygons.num_polygons(), this->stream()); + + cuspatial::polygon_bounding_boxes(multipolygons.part_offset_begin(), + multipolygons.part_offset_end(), + multipolygons.ring_offset_begin(), + multipolygons.ring_offset_end(), + multipolygons.point_begin(), + multipolygons.point_end(), + bboxes.begin(), + T{0}, + this->stream()); + + EXPECT_GT(bboxes.size(), 0); + + auto [poly_indices, quad_indices] = cuspatial::join_quadtree_and_bounding_boxes( + quadtree, bboxes.begin(), bboxes.end(), v_min, scale, max_depth, this->stream()); + + auto [actual_poly_indices, actual_point_indices] = + cuspatial::quadtree_point_in_polygon(poly_indices.begin(), + poly_indices.end(), + quad_indices.begin(), + quadtree, + point_indices.begin(), + point_indices.end(), + points.begin(), + multipolygons, + this->stream()); + + EXPECT_GT(actual_point_indices.size(), 0); + EXPECT_GT(actual_poly_indices.size(), 0); + + EXPECT_EQ(actual_point_indices.size(), expected_size); + EXPECT_EQ(actual_poly_indices.size(), expected_size); +} diff --git a/dependencies.yaml b/dependencies.yaml index 97af06191..7fe3fa2f6 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -18,6 +18,7 @@ files: - depends_on_cuml - depends_on_cupy - run_python_cuspatial + - test_libcuspatial - test_python_cuspatial - test_python_cuproj - notebooks @@ -25,6 +26,7 @@ files: output: none includes: - cuda_version + - test_libcuspatial test_python: output: none includes: @@ -32,6 +34,7 @@ files: - py_version - test_python_cuspatial - test_python_cuproj + - test_cuspatial test_notebooks: output: none includes: @@ -39,6 +42,7 @@ files: - depends_on_cuml - notebooks - py_version + - test_cuspatial checks: output: none includes: @@ -50,6 +54,7 @@ files: - cuda_version - docs - py_version + - test_cuspatial py_build_cuspatial: output: [pyproject] pyproject_dir: python/cuspatial @@ -105,6 +110,7 @@ files: includes: - test_python_cuproj - depends_on_cuspatial + - test_cuspatial channels: - rapidsai @@ -122,8 +128,8 @@ dependencies: packages: - c-compiler - cxx-compiler - - libcudf==24.6.* - - librmm==24.6.* + - libcudf==24.8.* + - librmm==24.8.* - proj - sqlite specific: @@ -165,7 +171,7 @@ dependencies: packages: - c-compiler - cxx-compiler - - librmm==24.6.* + - librmm==24.8.* - proj - sqlite specific: @@ -226,7 +232,6 @@ dependencies: - output_types: [requirements, pyproject] packages: - wheel - - setuptools cuda_version: specific: - output_types: conda @@ -356,7 +361,7 @@ dependencies: common: - output_types: conda packages: - - &rmm_conda rmm==24.6.* + - &rmm_conda rmm==24.8.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -367,17 +372,17 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - rmm-cu12==24.6.* + - rmm-cu12==24.8.* - matrix: {cuda: "11.*"} packages: - - rmm-cu11==24.6.* + - rmm-cu11==24.8.* - {matrix: null, packages: [*rmm_conda]} depends_on_cudf: common: - output_types: conda packages: - - &cudf_conda cudf==24.6.* + - &cudf_conda cudf==24.8.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -388,17 +393,17 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cudf-cu12==24.6.* + - cudf-cu12==24.8.* - matrix: {cuda: "11.*"} packages: - - cudf-cu11==24.6.* + - cudf-cu11==24.8.* - {matrix: null, packages: [*cudf_conda]} depends_on_cuml: common: - output_types: conda packages: - - &cuml_conda cuml==24.6.* + - &cuml_conda cuml==24.8.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -409,17 +414,17 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cuml-cu12==24.6.* + - cuml-cu12==24.8.* - matrix: {cuda: "11.*"} packages: - - cuml-cu11==24.6.* + - cuml-cu11==24.8.* - {matrix: null, packages: [*cuml_conda]} depends_on_cuspatial: common: - output_types: conda packages: - - &cuspatial_conda cuspatial==24.6.* + - &cuspatial_conda cuspatial==24.8.* - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -430,10 +435,10 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cuspatial-cu12==24.6.* + - cuspatial-cu12==24.8.* - matrix: {cuda: "11.*"} packages: - - cuspatial-cu11==24.6.* + - cuspatial-cu11==24.8.* - {matrix: null, packages: [*cuspatial_conda]} depends_on_cupy: @@ -451,3 +456,16 @@ dependencies: packages: - cupy-cuda11x>=12.0.0 - {matrix: null, packages: [cupy-cuda11x>=12.0.0]} + test_libcuspatial: + common: + - output_types: conda + packages: + - libcuspatial==24.8.* + - libcuspatial-tests==24.8.* + test_cuspatial: + common: + - output_types: conda + packages: + - libcuspatial==24.8.* + - cuspatial==24.8.* + - cuproj==24.8.* diff --git a/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb b/docs/cuproj/source/user_guide/cuproj_api_examples.ipynb index 8dd25cb28..1250daf54 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.06 --solver=libmamba -c rapidsai -c conda-forge -c nvidia \\ \n", + "# !conda create -n rapids-24.08 --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/user_guide/cuspatial_api_examples.ipynb b/docs/source/user_guide/cuspatial_api_examples.ipynb index a20b8cf1e..f5b207541 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.06 -c rapidsai -c conda-forge -c nvidia \\ \n", - "# cuspatial=24.06 python=3.9 cudatoolkit=11.5 " + "# !conda create -n rapids-24.08 -c rapidsai -c conda-forge -c nvidia \\ \n", + "# cuspatial=24.08 python=3.9 cudatoolkit=11.5 " ] }, { diff --git a/python/cuproj/pyproject.toml b/python/cuproj/pyproject.toml index 54c4a3709..8392dc75f 100644 --- a/python/cuproj/pyproject.toml +++ b/python/cuproj/pyproject.toml @@ -18,9 +18,8 @@ requires = [ "cmake>=3.26.4", "cython>=3.0.0", "ninja", - "rmm==24.6.*", + "rmm==24.8.*", "scikit-build-core[pyproject]>=0.7.0", - "setuptools", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -34,7 +33,7 @@ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ "cupy-cuda11x>=12.0.0", - "rmm==24.6.*", + "rmm==24.8.*", ] # 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", @@ -49,7 +48,7 @@ classifiers = [ [project.optional-dependencies] test = [ - "cuspatial==24.6.*", + "cuspatial==24.8.*", "geopandas>=0.11.0", "numpy>=1.23,<2.0a0", "pyproj>=3.6.0,<3.7a0", diff --git a/python/cuspatial/pyproject.toml b/python/cuspatial/pyproject.toml index b4ae45e9e..b2d6eddbd 100644 --- a/python/cuspatial/pyproject.toml +++ b/python/cuspatial/pyproject.toml @@ -16,12 +16,11 @@ build-backend = "scikit_build_core.build" requires = [ "cmake>=3.26.4", - "cudf==24.6.*", + "cudf==24.8.*", "cython>=3.0.0", "ninja", - "rmm==24.6.*", + "rmm==24.8.*", "scikit-build-core[pyproject]>=0.7.0", - "setuptools", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -36,10 +35,10 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cudf==24.6.*", + "cudf==24.8.*", "geopandas>=0.11.0", "numpy>=1.23,<2.0a0", - "rmm==24.6.*", + "rmm==24.8.*", ] # 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",