From 9c616dec64d13f74451e60d2f1d95dca06c1bf28 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 29 Aug 2024 14:18:21 -0500 Subject: [PATCH] cuproj: depend on librmm, not rmm (#1448) Contributes to https://github.com/rapidsai/build-planning/issues/33 `cuproj` does not need the `rmm` Python package... it only needs the RMM headers at build time. This proposes the following changes for `cuproj`: * dropping the runtime requirement on `rmm` in wheels and conda packages * switching the build requirement from `rmm` to `librmm` for wheels and conda packages * removing unnecessary imports in the `test:` environment for conda packages For more context on these changes, see https://github.com/rapidsai/build-planning/issues/92. ## Notes for Reviewers ### Benefits of these changes Faster conda builds (via dropping unnecessary dependencies). Cheaper (in terms of bandwidth and disk space) installation of wheels and conda packages (via removing an unnecessary runtime dependency). Reduces a source of network calls (and therefore CI instability) by removing some CPM downloads of RMM. Before: ```text -- CPM: Adding package rmm@24.10 (branch-24.10) ``` ([build link](https://github.com/rapidsai/cuspatial/actions/runs/10618529204/job/29434041322#step:9:16754)) After (this PR): ```text -- CPM: Using local package rmm@24.10.0 ``` ([build link](https://github.com/rapidsai/cuspatial/actions/runs/10619138604/job/29436119470?pr=1448#step:9:11256)) ### Is this required for `libcuspatial` wheel packaging? No, it's just a side thing I noticed while working on that. The two are totally independent. # Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: https://github.com/rapidsai/cuspatial/pull/1448 --- conda/recipes/cuproj/meta.yaml | 8 +------- dependencies.yaml | 6 ++---- python/cuproj/pyproject.toml | 3 +-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/conda/recipes/cuproj/meta.yaml b/conda/recipes/cuproj/meta.yaml index 6851ab214..29d590bc0 100644 --- a/conda/recipes/cuproj/meta.yaml +++ b/conda/recipes/cuproj/meta.yaml @@ -62,7 +62,7 @@ requirements: - cython >=3.0.0 - python - rapids-build-backend >=0.3.0,<0.4.0.dev0 - - rmm ={{ minor_version }} + - librmm ={{ minor_version }} - scikit-build-core >=0.10.0 - proj - sqlite @@ -74,17 +74,11 @@ requirements: {% endif %} - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - python - - rmm ={{ minor_version }} - cupy>=12.0.0 test: # [linux64] imports: # [linux64] - cuproj # [linux64] - requires: - - cupy>=12.0.0 - - cuspatial ={{ minor_version }} - - rmm ={{ minor_version }} - about: home: https://rapids.ai/ diff --git a/dependencies.yaml b/dependencies.yaml index 80822b43d..859009683 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -113,17 +113,16 @@ files: table: tool.rapids-build-backend key: requires includes: - - depends_on_rmm - build_cpp_cuproj - build_python - build_wheels + - depends_on_librmm py_run_cuproj: output: [pyproject] pyproject_dir: python/cuproj extras: table: project includes: - - depends_on_rmm - depends_on_cupy py_test_cuproj: output: [pyproject] @@ -193,7 +192,6 @@ dependencies: packages: - c-compiler - cxx-compiler - - &librmm_unsuffixed librmm==24.10.*,>=0.0.0a0 - proj - sqlite specific: @@ -556,7 +554,7 @@ dependencies: common: - output_types: conda packages: - - *librmm_unsuffixed + - &librmm_unsuffixed librmm==24.10.*,>=0.0.0a0 - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file diff --git a/python/cuproj/pyproject.toml b/python/cuproj/pyproject.toml index 7625a01f9..6c4d6cc2d 100644 --- a/python/cuproj/pyproject.toml +++ b/python/cuproj/pyproject.toml @@ -29,7 +29,6 @@ license = { text = "Apache 2.0" } requires-python = ">=3.10" dependencies = [ "cupy-cuda11x>=12.0.0", - "rmm==24.10.*,>=0.0.0a0", ] # 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", @@ -122,7 +121,7 @@ matrix-entry = "cuda_suffixed=true" requires = [ "cmake>=3.26.4,!=3.30.0", "cython>=3.0.0", + "librmm==24.10.*,>=0.0.0a0", "ninja", - "rmm==24.10.*,>=0.0.0a0", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.