Skip to content

Commit

Permalink
Move rmm Python package to subdirectory (#1526)
Browse files Browse the repository at this point in the history
This change is in preparation for #1512.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Ray Douglass (https://github.com/raydouglass)

URL: #1526
  • Loading branch information
vyasr authored Apr 11, 2024
1 parent 7d7d65a commit 9e02f34
Show file tree
Hide file tree
Showing 73 changed files with 29 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ repos:
rev: 5.12.0
hooks:
- id: isort
args: ["--settings-path=python/pyproject.toml"]
args: ["--settings-path=python/rmm/pyproject.toml"]
files: python/.*
types_or: [python, cython, pyi]
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
args: ["--config=python/pyproject.toml"]
args: ["--config=python/rmm/pyproject.toml"]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.15.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
- Use `conda env create --yes` instead of `--force` ([#1509](https://github.com/rapidsai/rmm/pull/1509)) [@bdice](https://github.com/bdice)
- Add upper bound to prevent usage of NumPy 2 ([#1501](https://github.com/rapidsai/rmm/pull/1501)) [@bdice](https://github.com/bdice)
- Remove hard-coding of RAPIDS version where possible ([#1496](https://github.com/rapidsai/rmm/pull/1496)) [@KyleFromNVIDIA](https://github.com/KyleFromNVIDIA)
- Requre NumPy 1.23+ ([#1488](https://github.com/rapidsai/rmm/pull/1488)) [@jakirkham](https://github.com/jakirkham)
- Require NumPy 1.23+ ([#1488](https://github.com/rapidsai/rmm/pull/1488)) [@jakirkham](https://github.com/jakirkham)
- Use `rmm::device_async_resource_ref` in multi_stream_allocation benchmark ([#1482](https://github.com/rapidsai/rmm/pull/1482)) [@miscco](https://github.com/miscco)
- Update devcontainers to CUDA Toolkit 12.2 ([#1470](https://github.com/rapidsai/rmm/pull/1470)) [@trxcllnt](https://github.com/trxcllnt)
- Add support for Python 3.11 ([#1469](https://github.com/rapidsai/rmm/pull/1469)) [@jameslamb](https://github.com/jameslamb)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,5 @@ fi
# Build and install the rmm Python package
if (( NUMARGS == 0 )) || hasArg rmm; then
echo "building and installing rmm..."
SKBUILD_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS}" python -m pip install --no-build-isolation --no-deps ${REPODIR}/python
SKBUILD_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS}" python -m pip install --no-build-isolation --no-deps ${REPODIR}/python/rmm
fi
2 changes: 1 addition & 1 deletion ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ doxygen Doxyfile
popd

rapids-logger "Build Python docs"
pushd python/docs
pushd python/rmm/docs
make dirhtml
make text
mkdir -p "${RAPIDS_DOCS_DIR}/rmm/"{html,txt}
Expand Down
2 changes: 1 addition & 1 deletion ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export CMAKE_GENERATOR=Ninja
rapids-print-env

package_name="rmm"
package_dir="python"
package_dir="python/rmm"

version=$(rapids-generate-version)
commit=$(git rev-parse HEAD)
Expand Down
3 changes: 1 addition & 2 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -euo pipefail

package_name="rmm"
package_dir="python"
package_dir="python/rmm"

source rapids-configure-sccache
source rapids-date-string
Expand All @@ -18,7 +18,6 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
# everywhere except in the final wheel name.
PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}"

# Patch project metadata files to include the CUDA version suffix and version override.
pyproject_file="${package_dir}/pyproject.toml"

sed -i "s/name = \"${package_name}\"/name = \"${package_name}${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
Expand Down
2 changes: 1 addition & 1 deletion ci/run_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
set -euo pipefail

# Support invoking run_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/rmm/

pytest --cache-clear -v "$@" .
2 changes: 1 addition & 1 deletion ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ RAPIDS_PY_WHEEL_NAME="rmm_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/rmm*.whl)[test]

python -m pytest ./python/rmm/tests
python -m pytest ./python/rmm/rmm/tests
12 changes: 11 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ files:
arch: [x86_64]
includes:
- build
- cython_build
- checks
- cuda
- cuda_version
Expand Down Expand Up @@ -39,18 +40,22 @@ files:
- py_version
py_build:
output: pyproject
pyproject_dir: python/rmm
extras:
table: build-system
includes:
- build
- cython_build
py_run:
output: pyproject
pyproject_dir: python/rmm
extras:
table: project
includes:
- run
py_optional_test:
output: pyproject
pyproject_dir: python/rmm
extras:
table: project.optional-dependencies
key: test
Expand All @@ -65,7 +70,6 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- &cmake_ver cmake>=3.26.4
- cython>=3.0.0
- ninja
- output_types: conda
packages:
Expand Down Expand Up @@ -106,6 +110,12 @@ dependencies:
cuda: "12.*"
packages:
- cuda-nvcc
cython_build:
common:
- output_types: [conda, requirements, pyproject]
packages:
- cython>=3.0.0
specific:
- output_types: [conda, requirements, pyproject]
matrices:
- matrix:
Expand Down
1 change: 0 additions & 1 deletion python/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion python/README.md

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions python/CMakeLists.txt → python/rmm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR)

include(../rapids_config.cmake)
include(../../rapids_config.cmake)

project(
rmm-python
Expand All @@ -36,7 +36,7 @@ if(NOT rmm_FOUND)
set(BUILD_BENCHMARKS OFF)
set(CUDA_STATIC_RUNTIME ON)

add_subdirectory(../ rmm-cpp EXCLUDE_FROM_ALL)
add_subdirectory(../../ rmm-cpp EXCLUDE_FROM_ALL)
endif()

include(rapids-cython-core)
Expand Down
1 change: 1 addition & 0 deletions python/rmm/LICENSE
1 change: 1 addition & 0 deletions python/rmm/README.md
1 change: 0 additions & 1 deletion python/rmm/VERSION

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion python/docs/conf.py → python/rmm/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
]

# Breathe Configuration
breathe_projects = {"librmm": "../../doxygen/xml"}
breathe_projects = {"librmm": "../../../doxygen/xml"}
breathe_default_project = "librmm"

copybutton_prompt_text = ">>> "
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions python/pyproject.toml → python/rmm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ requires = [
"cython>=3.0.0",
"ninja",
"scikit-build-core[pyproject]>=0.7.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project]
name = "rmm"
Expand All @@ -36,7 +36,7 @@ dependencies = [
"cuda-python>=11.7.1,<12.0a0",
"numba>=0.57",
"numpy>=1.23,<2.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # 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",
"Topic :: Database",
Expand All @@ -52,7 +52,7 @@ classifiers = [
test = [
"pytest",
"pytest-cov",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project.urls]
Homepage = "https://github.com/rapidsai/rmm"
Expand Down
1 change: 1 addition & 0 deletions python/rmm/rmm/VERSION
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9e02f34

Please sign in to comment.