diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4df64d11a..c266be0bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d870908d..f78aa7692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/build.sh b/build.sh index ec08fa402..fce8e0586 100755 --- a/build.sh +++ b/build.sh @@ -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 diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 1239bdac3..5519a3c35 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -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} diff --git a/ci/build_python.sh b/ci/build_python.sh index b197b1ae1..394b3a453 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -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) diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index b2d953361..b76e882b3 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -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 @@ -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} diff --git a/ci/run_pytests.sh b/ci/run_pytests.sh index 73780fcc3..6bda50870 100755 --- a/ci/run_pytests.sh +++ b/ci/run_pytests.sh @@ -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 "$@" . diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index 708b1d930..3faf15ba2 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -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 diff --git a/dependencies.yaml b/dependencies.yaml index 548999f1b..10d0eab2d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -7,6 +7,7 @@ files: arch: [x86_64] includes: - build + - cython_build - checks - cuda - cuda_version @@ -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 @@ -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: @@ -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: diff --git a/python/LICENSE b/python/LICENSE deleted file mode 120000 index ea5b60640..000000000 --- a/python/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../LICENSE \ No newline at end of file diff --git a/python/README.md b/python/README.md deleted file mode 120000 index 32d46ee88..000000000 --- a/python/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/python/.coveragerc b/python/rmm/.coveragerc similarity index 100% rename from python/.coveragerc rename to python/rmm/.coveragerc diff --git a/python/CMakeLists.txt b/python/rmm/CMakeLists.txt similarity index 94% rename from python/CMakeLists.txt rename to python/rmm/CMakeLists.txt index 87752ff24..22b5ea282 100644 --- a/python/CMakeLists.txt +++ b/python/rmm/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -include(../rapids_config.cmake) +include(../../rapids_config.cmake) project( rmm-python @@ -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) diff --git a/python/rmm/LICENSE b/python/rmm/LICENSE new file mode 120000 index 000000000..30cff7403 --- /dev/null +++ b/python/rmm/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/python/rmm/README.md b/python/rmm/README.md new file mode 120000 index 000000000..fe8400541 --- /dev/null +++ b/python/rmm/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/python/rmm/VERSION b/python/rmm/VERSION deleted file mode 120000 index 558194c5a..000000000 --- a/python/rmm/VERSION +++ /dev/null @@ -1 +0,0 @@ -../../VERSION \ No newline at end of file diff --git a/python/docs/Makefile b/python/rmm/docs/Makefile similarity index 100% rename from python/docs/Makefile rename to python/rmm/docs/Makefile diff --git a/python/docs/conf.py b/python/rmm/docs/conf.py similarity index 99% rename from python/docs/conf.py rename to python/rmm/docs/conf.py index d66e9d30c..0140c84b2 100644 --- a/python/docs/conf.py +++ b/python/rmm/docs/conf.py @@ -58,7 +58,7 @@ ] # Breathe Configuration -breathe_projects = {"librmm": "../../doxygen/xml"} +breathe_projects = {"librmm": "../../../doxygen/xml"} breathe_default_project = "librmm" copybutton_prompt_text = ">>> " diff --git a/python/docs/cpp.rst b/python/rmm/docs/cpp.rst similarity index 100% rename from python/docs/cpp.rst rename to python/rmm/docs/cpp.rst diff --git a/python/docs/cpp_api.rst b/python/rmm/docs/cpp_api.rst similarity index 100% rename from python/docs/cpp_api.rst rename to python/rmm/docs/cpp_api.rst diff --git a/python/docs/guide.md b/python/rmm/docs/guide.md similarity index 100% rename from python/docs/guide.md rename to python/rmm/docs/guide.md diff --git a/python/docs/index.rst b/python/rmm/docs/index.rst similarity index 100% rename from python/docs/index.rst rename to python/rmm/docs/index.rst diff --git a/python/docs/librmm_docs/cuda_device_management.rst b/python/rmm/docs/librmm_docs/cuda_device_management.rst similarity index 100% rename from python/docs/librmm_docs/cuda_device_management.rst rename to python/rmm/docs/librmm_docs/cuda_device_management.rst diff --git a/python/docs/librmm_docs/cuda_streams.rst b/python/rmm/docs/librmm_docs/cuda_streams.rst similarity index 100% rename from python/docs/librmm_docs/cuda_streams.rst rename to python/rmm/docs/librmm_docs/cuda_streams.rst diff --git a/python/docs/librmm_docs/data_containers.rst b/python/rmm/docs/librmm_docs/data_containers.rst similarity index 100% rename from python/docs/librmm_docs/data_containers.rst rename to python/rmm/docs/librmm_docs/data_containers.rst diff --git a/python/docs/librmm_docs/deprecated.rst b/python/rmm/docs/librmm_docs/deprecated.rst similarity index 100% rename from python/docs/librmm_docs/deprecated.rst rename to python/rmm/docs/librmm_docs/deprecated.rst diff --git a/python/docs/librmm_docs/errors.rst b/python/rmm/docs/librmm_docs/errors.rst similarity index 100% rename from python/docs/librmm_docs/errors.rst rename to python/rmm/docs/librmm_docs/errors.rst diff --git a/python/docs/librmm_docs/index.rst b/python/rmm/docs/librmm_docs/index.rst similarity index 100% rename from python/docs/librmm_docs/index.rst rename to python/rmm/docs/librmm_docs/index.rst diff --git a/python/docs/librmm_docs/logging.rst b/python/rmm/docs/librmm_docs/logging.rst similarity index 100% rename from python/docs/librmm_docs/logging.rst rename to python/rmm/docs/librmm_docs/logging.rst diff --git a/python/docs/librmm_docs/memory_resources.rst b/python/rmm/docs/librmm_docs/memory_resources.rst similarity index 100% rename from python/docs/librmm_docs/memory_resources.rst rename to python/rmm/docs/librmm_docs/memory_resources.rst diff --git a/python/docs/librmm_docs/thrust_integrations.rst b/python/rmm/docs/librmm_docs/thrust_integrations.rst similarity index 100% rename from python/docs/librmm_docs/thrust_integrations.rst rename to python/rmm/docs/librmm_docs/thrust_integrations.rst diff --git a/python/docs/librmm_docs/utilities.rst b/python/rmm/docs/librmm_docs/utilities.rst similarity index 100% rename from python/docs/librmm_docs/utilities.rst rename to python/rmm/docs/librmm_docs/utilities.rst diff --git a/python/docs/python.rst b/python/rmm/docs/python.rst similarity index 100% rename from python/docs/python.rst rename to python/rmm/docs/python.rst diff --git a/python/docs/python_api.rst b/python/rmm/docs/python_api.rst similarity index 100% rename from python/docs/python_api.rst rename to python/rmm/docs/python_api.rst diff --git a/python/pyproject.toml b/python/rmm/pyproject.toml similarity index 91% rename from python/pyproject.toml rename to python/rmm/pyproject.toml index 3f294d180..ea8639feb 100644 --- a/python/pyproject.toml +++ b/python/rmm/pyproject.toml @@ -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" @@ -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", @@ -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" diff --git a/python/rmm/rmm/VERSION b/python/rmm/rmm/VERSION new file mode 120000 index 000000000..d62dc733e --- /dev/null +++ b/python/rmm/rmm/VERSION @@ -0,0 +1 @@ +../../../VERSION \ No newline at end of file diff --git a/python/rmm/__init__.py b/python/rmm/rmm/__init__.py similarity index 100% rename from python/rmm/__init__.py rename to python/rmm/rmm/__init__.py diff --git a/python/rmm/_cuda/CMakeLists.txt b/python/rmm/rmm/_cuda/CMakeLists.txt similarity index 100% rename from python/rmm/_cuda/CMakeLists.txt rename to python/rmm/rmm/_cuda/CMakeLists.txt diff --git a/python/rmm/_cuda/__init__.pxd b/python/rmm/rmm/_cuda/__init__.pxd similarity index 100% rename from python/rmm/_cuda/__init__.pxd rename to python/rmm/rmm/_cuda/__init__.pxd diff --git a/python/rmm/_cuda/__init__.py b/python/rmm/rmm/_cuda/__init__.py similarity index 100% rename from python/rmm/_cuda/__init__.py rename to python/rmm/rmm/_cuda/__init__.py diff --git a/python/rmm/_cuda/gpu.py b/python/rmm/rmm/_cuda/gpu.py similarity index 100% rename from python/rmm/_cuda/gpu.py rename to python/rmm/rmm/_cuda/gpu.py diff --git a/python/rmm/_cuda/stream.pxd b/python/rmm/rmm/_cuda/stream.pxd similarity index 100% rename from python/rmm/_cuda/stream.pxd rename to python/rmm/rmm/_cuda/stream.pxd diff --git a/python/rmm/_cuda/stream.pyx b/python/rmm/rmm/_cuda/stream.pyx similarity index 100% rename from python/rmm/_cuda/stream.pyx rename to python/rmm/rmm/_cuda/stream.pyx diff --git a/python/rmm/_lib/CMakeLists.txt b/python/rmm/rmm/_lib/CMakeLists.txt similarity index 100% rename from python/rmm/_lib/CMakeLists.txt rename to python/rmm/rmm/_lib/CMakeLists.txt diff --git a/python/rmm/_lib/__init__.pxd b/python/rmm/rmm/_lib/__init__.pxd similarity index 100% rename from python/rmm/_lib/__init__.pxd rename to python/rmm/rmm/_lib/__init__.pxd diff --git a/python/rmm/_lib/__init__.py b/python/rmm/rmm/_lib/__init__.py similarity index 100% rename from python/rmm/_lib/__init__.py rename to python/rmm/rmm/_lib/__init__.py diff --git a/python/rmm/_lib/_torch_allocator.cpp b/python/rmm/rmm/_lib/_torch_allocator.cpp similarity index 100% rename from python/rmm/_lib/_torch_allocator.cpp rename to python/rmm/rmm/_lib/_torch_allocator.cpp diff --git a/python/rmm/_lib/cuda_stream.pxd b/python/rmm/rmm/_lib/cuda_stream.pxd similarity index 100% rename from python/rmm/_lib/cuda_stream.pxd rename to python/rmm/rmm/_lib/cuda_stream.pxd diff --git a/python/rmm/_lib/cuda_stream.pyx b/python/rmm/rmm/_lib/cuda_stream.pyx similarity index 100% rename from python/rmm/_lib/cuda_stream.pyx rename to python/rmm/rmm/_lib/cuda_stream.pyx diff --git a/python/rmm/_lib/cuda_stream_pool.pxd b/python/rmm/rmm/_lib/cuda_stream_pool.pxd similarity index 100% rename from python/rmm/_lib/cuda_stream_pool.pxd rename to python/rmm/rmm/_lib/cuda_stream_pool.pxd diff --git a/python/rmm/_lib/cuda_stream_view.pxd b/python/rmm/rmm/_lib/cuda_stream_view.pxd similarity index 100% rename from python/rmm/_lib/cuda_stream_view.pxd rename to python/rmm/rmm/_lib/cuda_stream_view.pxd diff --git a/python/rmm/_lib/device_buffer.pxd b/python/rmm/rmm/_lib/device_buffer.pxd similarity index 100% rename from python/rmm/_lib/device_buffer.pxd rename to python/rmm/rmm/_lib/device_buffer.pxd diff --git a/python/rmm/_lib/device_buffer.pyx b/python/rmm/rmm/_lib/device_buffer.pyx similarity index 100% rename from python/rmm/_lib/device_buffer.pyx rename to python/rmm/rmm/_lib/device_buffer.pyx diff --git a/python/rmm/_lib/device_uvector.pxd b/python/rmm/rmm/_lib/device_uvector.pxd similarity index 100% rename from python/rmm/_lib/device_uvector.pxd rename to python/rmm/rmm/_lib/device_uvector.pxd diff --git a/python/rmm/_lib/lib.pxd b/python/rmm/rmm/_lib/lib.pxd similarity index 100% rename from python/rmm/_lib/lib.pxd rename to python/rmm/rmm/_lib/lib.pxd diff --git a/python/rmm/_lib/lib.pyx b/python/rmm/rmm/_lib/lib.pyx similarity index 100% rename from python/rmm/_lib/lib.pyx rename to python/rmm/rmm/_lib/lib.pyx diff --git a/python/rmm/_lib/logger.pyx b/python/rmm/rmm/_lib/logger.pyx similarity index 100% rename from python/rmm/_lib/logger.pyx rename to python/rmm/rmm/_lib/logger.pyx diff --git a/python/rmm/_lib/memory_resource.pxd b/python/rmm/rmm/_lib/memory_resource.pxd similarity index 100% rename from python/rmm/_lib/memory_resource.pxd rename to python/rmm/rmm/_lib/memory_resource.pxd diff --git a/python/rmm/_lib/memory_resource.pyx b/python/rmm/rmm/_lib/memory_resource.pyx similarity index 100% rename from python/rmm/_lib/memory_resource.pyx rename to python/rmm/rmm/_lib/memory_resource.pyx diff --git a/python/rmm/_lib/per_device_resource.pxd b/python/rmm/rmm/_lib/per_device_resource.pxd similarity index 100% rename from python/rmm/_lib/per_device_resource.pxd rename to python/rmm/rmm/_lib/per_device_resource.pxd diff --git a/python/rmm/_lib/tests/__init__.py b/python/rmm/rmm/_lib/tests/__init__.py similarity index 100% rename from python/rmm/_lib/tests/__init__.py rename to python/rmm/rmm/_lib/tests/__init__.py diff --git a/python/rmm/_lib/tests/test_device_buffer.pyx b/python/rmm/rmm/_lib/tests/test_device_buffer.pyx similarity index 100% rename from python/rmm/_lib/tests/test_device_buffer.pyx rename to python/rmm/rmm/_lib/tests/test_device_buffer.pyx diff --git a/python/rmm/_version.py b/python/rmm/rmm/_version.py similarity index 100% rename from python/rmm/_version.py rename to python/rmm/rmm/_version.py diff --git a/python/rmm/allocators/__init__.py b/python/rmm/rmm/allocators/__init__.py similarity index 100% rename from python/rmm/allocators/__init__.py rename to python/rmm/rmm/allocators/__init__.py diff --git a/python/rmm/allocators/cupy.py b/python/rmm/rmm/allocators/cupy.py similarity index 100% rename from python/rmm/allocators/cupy.py rename to python/rmm/rmm/allocators/cupy.py diff --git a/python/rmm/allocators/numba.py b/python/rmm/rmm/allocators/numba.py similarity index 100% rename from python/rmm/allocators/numba.py rename to python/rmm/rmm/allocators/numba.py diff --git a/python/rmm/allocators/torch.py b/python/rmm/rmm/allocators/torch.py similarity index 100% rename from python/rmm/allocators/torch.py rename to python/rmm/rmm/allocators/torch.py diff --git a/python/rmm/mr.py b/python/rmm/rmm/mr.py similarity index 100% rename from python/rmm/mr.py rename to python/rmm/rmm/mr.py diff --git a/python/rmm/rmm.py b/python/rmm/rmm/rmm.py similarity index 100% rename from python/rmm/rmm.py rename to python/rmm/rmm/rmm.py diff --git a/python/rmm/tests/conftest.py b/python/rmm/rmm/tests/conftest.py similarity index 100% rename from python/rmm/tests/conftest.py rename to python/rmm/rmm/tests/conftest.py diff --git a/python/rmm/tests/test_cython.py b/python/rmm/rmm/tests/test_cython.py similarity index 100% rename from python/rmm/tests/test_cython.py rename to python/rmm/rmm/tests/test_cython.py diff --git a/python/rmm/tests/test_rmm.py b/python/rmm/rmm/tests/test_rmm.py similarity index 100% rename from python/rmm/tests/test_rmm.py rename to python/rmm/rmm/tests/test_rmm.py diff --git a/python/rmm/tests/test_rmm_pytorch.py b/python/rmm/rmm/tests/test_rmm_pytorch.py similarity index 100% rename from python/rmm/tests/test_rmm_pytorch.py rename to python/rmm/rmm/tests/test_rmm_pytorch.py