diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bd5ad3853..67af4dafc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.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-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.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-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.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-action-workflows/.github/workflows/custom-job.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -68,19 +68,17 @@ jobs: run_script: "ci/build_docs.sh" wheel-build: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} sha: ${{ inputs.sha }} date: ${{ inputs.date }} - package-name: rmm - package-dir: python - skbuild-configure-options: "-DRMM_BUILD_WHEELS=ON" + script: ci/build_wheel.sh wheel-publish: needs: wheel-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.08 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0e5a92b79..f5b7e3bf5 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -21,40 +21,40 @@ jobs: - wheel-build - wheel-tests secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.08 checks: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.08 with: enable_check_generated_files: false conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08 with: build_type: pull-request conda-cpp-tests: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.08 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08 with: build_type: pull-request docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -64,18 +64,14 @@ jobs: wheel-build: needs: checks secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08 with: build_type: pull-request - package-dir: python - package-name: rmm - skbuild-configure-options: "-DRMM_BUILD_WHEELS=ON" + script: ci/build_wheel.sh wheel-tests: needs: wheel-build secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08 with: build_type: pull-request - package-name: rmm - test-unittest: "python -m pytest ./python/rmm/tests" - test-smoketest: "python ./ci/wheel_smoke_test.py" + script: ci/test_wheel.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 039fd3b42..9a26dac4a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: cpp-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.08 with: build_type: nightly branch: ${{ inputs.branch }} @@ -24,7 +24,7 @@ jobs: sha: ${{ inputs.sha }} python-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08 with: build_type: nightly branch: ${{ inputs.branch }} @@ -32,11 +32,10 @@ jobs: sha: ${{ inputs.sha }} wheel-tests: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.06 + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08 with: build_type: nightly branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} - package-name: rmm - test-unittest: "python -m pytest ./python/rmm/tests" + script: ci/test_wheel.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ee3cc4e7..aa076e6be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,17 +22,8 @@ repos: hooks: - id: black args: ["--config=python/pyproject.toml"] - - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 - hooks: - - id: flake8 - args: ["--config=python/.flake8"] - files: python/.*$ - types: [file] - types_or: [python, cython] - additional_dependencies: ["flake8-force"] - repo: https://github.com/MarcoGorelli/cython-lint - rev: v0.1.10 + rev: v0.15.0 hooks: - id: cython-lint - repo: https://github.com/pre-commit/mirrors-clang-format @@ -78,6 +69,11 @@ repos: # of dependencies, so we'll have to update this manually. additional_dependencies: - cmakelang==0.6.13 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.278 + hooks: + - id: ruff + files: python/.*$ default_language_version: python: python3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 385798d20..453ab54c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,38 @@ +# RMM 23.08.00 (9 Aug 2023) + +## 🚨 Breaking Changes + +- Stop invoking setup.py ([#1300](https://github.com/rapidsai/rmm/pull/1300)) [@vyasr](https://github.com/vyasr) +- Remove now-deprecated top-level allocator functions ([#1281](https://github.com/rapidsai/rmm/pull/1281)) [@wence-](https://github.com/wence-) +- Remove padding from device_memory_resource ([#1278](https://github.com/rapidsai/rmm/pull/1278)) [@vyasr](https://github.com/vyasr) + +## 🐛 Bug Fixes + +- Fix typo in wheels-test.yaml. ([#1310](https://github.com/rapidsai/rmm/pull/1310)) [@bdice](https://github.com/bdice) +- Add a missing '#include <array>' in logger.hpp ([#1295](https://github.com/rapidsai/rmm/pull/1295)) [@valgur](https://github.com/valgur) +- Use gbench `thread_index()` accessor to fix replay bench compilation ([#1293](https://github.com/rapidsai/rmm/pull/1293)) [@harrism](https://github.com/harrism) +- Ensure logger tests don't generate temp directories in build dir ([#1289](https://github.com/rapidsai/rmm/pull/1289)) [@robertmaynard](https://github.com/robertmaynard) + +## 🚀 New Features + +- Remove now-deprecated top-level allocator functions ([#1281](https://github.com/rapidsai/rmm/pull/1281)) [@wence-](https://github.com/wence-) + +## 🛠️ Improvements + +- Switch to new CI wheel building pipeline ([#1305](https://github.com/rapidsai/rmm/pull/1305)) [@vyasr](https://github.com/vyasr) +- Revert CUDA 12.0 CI workflows to branch-23.08. ([#1303](https://github.com/rapidsai/rmm/pull/1303)) [@bdice](https://github.com/bdice) +- Update linters: remove flake8, add ruff, update cython-lint ([#1302](https://github.com/rapidsai/rmm/pull/1302)) [@vyasr](https://github.com/vyasr) +- Adding identify minimum version requirement ([#1301](https://github.com/rapidsai/rmm/pull/1301)) [@hyperbolic2346](https://github.com/hyperbolic2346) +- Stop invoking setup.py ([#1300](https://github.com/rapidsai/rmm/pull/1300)) [@vyasr](https://github.com/vyasr) +- Use cuda-version to constrain cudatoolkit. ([#1296](https://github.com/rapidsai/rmm/pull/1296)) [@bdice](https://github.com/bdice) +- Update to CMake 3.26.4 ([#1291](https://github.com/rapidsai/rmm/pull/1291)) [@vyasr](https://github.com/vyasr) +- use rapids-upload-docs script ([#1288](https://github.com/rapidsai/rmm/pull/1288)) [@AyodeAwe](https://github.com/AyodeAwe) +- Reorder parameters in RMM_EXPECTS ([#1286](https://github.com/rapidsai/rmm/pull/1286)) [@vyasr](https://github.com/vyasr) +- Remove documentation build scripts for Jenkins ([#1285](https://github.com/rapidsai/rmm/pull/1285)) [@ajschmidt8](https://github.com/ajschmidt8) +- Remove padding from device_memory_resource ([#1278](https://github.com/rapidsai/rmm/pull/1278)) [@vyasr](https://github.com/vyasr) +- Unpin scikit-build upper bound ([#1275](https://github.com/rapidsai/rmm/pull/1275)) [@vyasr](https://github.com/vyasr) +- RMM: Build CUDA 12 packages ([#1223](https://github.com/rapidsai/rmm/pull/1223)) [@bdice](https://github.com/bdice) + # RMM 23.06.00 (7 Jun 2023) ## 🚨 Breaking Changes diff --git a/CMakeLists.txt b/CMakeLists.txt index b298f3cb2..2c4453968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,10 +12,10 @@ # the License. # ============================================================================= -cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) - file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.06/RAPIDS.cmake + file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.08/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) endif() include(${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) @@ -27,7 +27,7 @@ include(rapids-find) project( RMM - VERSION 23.06.00 + VERSION 23.08.00 LANGUAGES CXX) # Write the version header diff --git a/README.md b/README.md index 737f43790..8d65b7d33 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,7 @@ RMM can be installed with Conda ([miniconda](https://conda.io/miniconda.html), o [Anaconda distribution](https://www.anaconda.com/download)) from the `rapidsai` channel: ```bash -# for CUDA 11.5 -conda install -c rapidsai -c conda-forge -c nvidia \ - rmm cudatoolkit=11.5 -# for CUDA 11.2 -conda install -c rapidsai -c conda-forge -c nvidia \ - rmm cudatoolkit=11.2 +conda install -c rapidsai -c conda-forge -c nvidia rmm cuda-version=11.8 ``` We also provide [nightly Conda packages](https://anaconda.org/rapidsai-nightly) built from the HEAD @@ -63,7 +58,7 @@ Compiler requirements: * `gcc` version 9.3+ * `nvcc` version 11.2+ -* `cmake` version 3.23.1+ +* `cmake` version 3.26.4+ CUDA/GPU requirements: diff --git a/benchmarks/replay/replay.cpp b/benchmarks/replay/replay.cpp index 9d2d00cc1..320811875 100644 --- a/benchmarks/replay/replay.cpp +++ b/benchmarks/replay/replay.cpp @@ -173,7 +173,7 @@ struct replay_benchmark { /// Create the memory resource shared by all threads before the benchmark runs void SetUp(const ::benchmark::State& state) { - if (state.thread_index == 0) { + if (state.thread_index() == 0) { rmm::logger().log(spdlog::level::info, "------ Start of Benchmark -----"); mr_ = factory_(simulated_size_); } @@ -182,7 +182,7 @@ struct replay_benchmark { /// Destroy the memory resource and count any unallocated memory void TearDown(const ::benchmark::State& state) { - if (state.thread_index == 0) { + if (state.thread_index() == 0) { rmm::logger().log(spdlog::level::info, "------ End of Benchmark -----"); // clean up any leaked allocations std::size_t total_leaked{0}; @@ -207,7 +207,7 @@ struct replay_benchmark { { SetUp(state); - auto const& my_events = events_.at(state.thread_index); + auto const& my_events = events_.at(state.thread_index()); for (auto _ : state) { // NOLINT(clang-analyzer-deadcode.DeadStores) std::for_each(my_events.begin(), my_events.end(), [this](auto event) { diff --git a/benchmarks/utilities/simulated_memory_resource.hpp b/benchmarks/utilities/simulated_memory_resource.hpp index 489339e69..993ec5ace 100644 --- a/benchmarks/utilities/simulated_memory_resource.hpp +++ b/benchmarks/utilities/simulated_memory_resource.hpp @@ -80,7 +80,7 @@ class simulated_memory_resource final : public device_memory_resource { void* do_allocate(std::size_t bytes, cuda_stream_view) override { // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) - RMM_EXPECTS(begin_ + bytes <= end_, rmm::bad_alloc, "Simulated memory size exceeded"); + RMM_EXPECTS(begin_ + bytes <= end_, "Simulated memory size exceeded", rmm::bad_alloc); auto* ptr = static_cast(begin_); begin_ += bytes; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) return ptr; diff --git a/build.sh b/build.sh index 5cbe43f6a..ed37b5973 100755 --- a/build.sh +++ b/build.sh @@ -27,7 +27,7 @@ HELP="$0 [clean] [librmm] [rmm] [-v] [-g] [-n] [-s] [--ptds] [--cmake-args=\"\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument) @@ -142,8 +142,9 @@ if hasArg --ptds; then fi # Append `-DFIND_RMM_CPP=ON` to CMAKE_ARGS unless a user specified the option. +SKBUILD_EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}" if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_RMM_CPP"* ]]; then - EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DFIND_RMM_CPP=ON" + SKBUILD_EXTRA_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS} -DFIND_RMM_CPP=ON" fi # If clean given, run it prior to any other steps @@ -174,15 +175,6 @@ fi # Build and install the rmm Python package if (( NUMARGS == 0 )) || hasArg rmm; then - cd "${REPODIR}/python" - export INSTALL_PREFIX - echo "building rmm..." - - python setup.py build_ext --inplace -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} ${EXTRA_CMAKE_ARGS} - - if [[ ${INSTALL_TARGET} != "" ]]; then - echo "installing rmm..." - python setup.py install --single-version-externally-managed --record=record.txt -- -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} ${EXTRA_CMAKE_ARGS} - fi - + echo "building and installing rmm..." + SKBUILD_CONFIGURE_OPTIONS="${SKBUILD_EXTRA_CMAKE_ARGS}" python -m pip install --no-build-isolation --no-deps ${REPODIR}/python fi diff --git a/ci/build_docs.sh b/ci/build_docs.sh index c3001f88f..7e1efef9a 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -19,29 +19,29 @@ 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) -VERSION_NUMBER="23.06" rapids-mamba-retry install \ --channel "${CPP_CHANNEL}" \ --channel "${PYTHON_CHANNEL}" \ rmm librmm -# Build CPP docs -rapids-logger "Build Doxygen docs" +export RAPIDS_VERSION_NUMBER="23.08" +export RAPIDS_DOCS_DIR="$(mktemp -d)" + +rapids-logger "Build CPP docs" pushd doxygen doxygen Doxyfile +mkdir -p "${RAPIDS_DOCS_DIR}/librmm/html" +mv html/* "${RAPIDS_DOCS_DIR}/librmm/html" popd -# Build Python docs rapids-logger "Build Python docs" pushd python/docs sphinx-build -b dirhtml . _html sphinx-build -b text . _text +mkdir -p "${RAPIDS_DOCS_DIR}/rmm/"{html,txt} +mv _html/* "${RAPIDS_DOCS_DIR}/rmm/html" +mv _text/* "${RAPIDS_DOCS_DIR}/rmm/txt" popd -if [[ "${RAPIDS_BUILD_TYPE}" != "pull-request" ]]; then - rapids-logger "Upload Docs to S3" - aws s3 sync --no-progress --delete doxygen/html "s3://rapidsai-docs/librmm/${VERSION_NUMBER}/html" - aws s3 sync --no-progress --delete python/docs/_html "s3://rapidsai-docs/rmm/${VERSION_NUMBER}/html" - aws s3 sync --no-progress --delete python/docs/_text "s3://rapidsai-docs/rmm/${VERSION_NUMBER}/txt" -fi +rapids-upload-docs diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh new file mode 100755 index 000000000..09c1e104e --- /dev/null +++ b/ci/build_wheel.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright (c) 2023, NVIDIA CORPORATION. + +set -euo pipefail + +source rapids-configure-sccache +source rapids-date-string + +# Use gha-tools rapids-pip-wheel-version to generate wheel version then +# update the necessary files +version_override="$(rapids-pip-wheel-version ${RAPIDS_DATE_STRING})" + +RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" + +ci/release/apply_wheel_modifications.sh ${version_override} "-${RAPIDS_PY_CUDA_SUFFIX}" +echo "The package name and/or version was modified in the package source. The git diff is:" +git diff + +cd python + +SKBUILD_CONFIGURE_OPTIONS="-DRMM_BUILD_WHEELS=ON" python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check + +mkdir -p final_dist +python -m auditwheel repair -w final_dist dist/* + +RAPIDS_PY_WHEEL_NAME="rmm_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist diff --git a/ci/check_style.sh b/ci/check_style.sh index 36b856ae6..4beaca333 100755 --- a/ci/check_style.sh +++ b/ci/check_style.sh @@ -14,7 +14,7 @@ rapids-dependency-file-generator \ rapids-mamba-retry env create --force -f env.yaml -n checks conda activate checks -FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.06/cmake-format-rapids-cmake.json +FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.08/cmake-format-rapids-cmake.json export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE}) wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL} diff --git a/ci/docs/build.sh b/ci/docs/build.sh deleted file mode 100644 index eed509dc5..000000000 --- a/ci/docs/build.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# Copyright (c) 2020, NVIDIA CORPORATION. -################################# -# RMM Docs build script for CI # -################################# - -if [ -z "$PROJECT_WORKSPACE" ]; then - echo ">>>> ERROR: Could not detect PROJECT_WORKSPACE in environment" - echo ">>>> WARNING: This script contains git commands meant for automated building, do not run locally" - exit 1 -fi - -export DOCS_WORKSPACE=$WORKSPACE/docs -export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH -export HOME=$WORKSPACE -export PROJECT_WORKSPACE=/rapids/rmm -export LIBCUDF_KERNEL_CACHE_PATH="$HOME/.jitify-cache" -export PROJECTS=(librmm rmm) - -gpuci_logger "Check environment" -env - -gpuci_logger "Check GPU usage" -nvidia-smi - -gpuci_logger "Activate conda env" -. /opt/conda/etc/profile.d/conda.sh -conda activate rapids - -gpuci_logger "Check versions" -python --version -$CC --version -$CXX --version - -gpuci_logger "Check conda environment" -conda info -conda config --show-sources -conda list --show-channel-urls - -# Build Doxygen docs -gpuci_logger "Build Doxygen docs" -cd $PROJECT_WORKSPACE/doxygen -doxygen Doxyfile - -# Build Python docs -gpuci_logger "Build Python docs" -cd $PROJECT_WORKSPACE/python/docs -make html - -#Commit to Website -cd $DOCS_WORKSPACE - -for PROJECT in ${PROJECTS[@]}; do - if [ ! -d "api/$PROJECT/$BRANCH_VERSION" ]; then - mkdir -p api/$PROJECT/$BRANCH_VERSION - fi - rm -rf $DOCS_WORKSPACE/api/$PROJECT/$BRANCH_VERSION/* -done - - -mv $PROJECT_WORKSPACE/doxygen/html/* $DOCS_WORKSPACE/api/librmm/$BRANCH_VERSION -mv $PROJECT_WORKSPACE/python/docs/_build/html/* $DOCS_WORKSPACE/api/rmm/$BRANCH_VERSION diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index ff90e410a..7314442ff 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -53,4 +53,4 @@ sed_runner 's/'"release =.*"'/'"release = \"${NEXT_FULL_TAG}\""'/g' python/docs/ for FILE in .github/workflows/*.yaml; do sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" done -sed_runner "s/VERSION_NUMBER=\".*/VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh +sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh new file mode 100755 index 000000000..4b03022f8 --- /dev/null +++ b/ci/test_wheel.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright (c) 2023, NVIDIA CORPORATION. + +set -eou pipefail + +RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" +RAPIDS_PY_WHEEL_NAME="rmm_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist + +# echo to expand wildcard before adding `[extra]` requires for pip +python -m pip install $(echo ./dist/rmm*.whl)[test] + +# Run smoke tests for aarch64 pull requests +if [ "$(arch)" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]; then + python ./ci/wheel_smoke_test.py +else + python -m pytest ./python/rmm/tests +fi diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 6df4ed34c..f668c4a4c 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -4,20 +4,23 @@ channels: - rapidsai - conda-forge dependencies: -- cmake>=3.23.1,!=3.25.0 -- cuda-python>=11.7.1,<12.0 -- cudatoolkit=11.8 +- cmake>=3.26.4 +- cuda-python>=11.7.1,<12.0a0 +- cuda-version=11.8 +- cudatoolkit - cython>=0.29,<0.30 - fmt>=9.1.0,<10 - gcovr>=5.0 +- identify>=2.5.20 - ninja - numba>=0.57 - numpy>=1.21 +- nvcc_linux-64=11.8 - pre-commit - pytest - pytest-cov - python>=3.9,<3.11 -- scikit-build>=0.13.1,<0.17.2 +- scikit-build>=0.13.1 - spdlog>=1.11.0,<1.12 - tomli name: all_cuda-118_arch-x86_64 diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml new file mode 100644 index 000000000..40291ba33 --- /dev/null +++ b/conda/environments/all_cuda-120_arch-x86_64.yaml @@ -0,0 +1,25 @@ +# This file is generated by `rapids-dependency-file-generator`. +# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +channels: +- rapidsai +- conda-forge +dependencies: +- cmake>=3.26.4 +- cuda-nvcc +- cuda-python>=12.0,<13.0a0 +- cuda-version=12.0 +- cython>=0.29,<0.30 +- fmt>=9.1.0,<10 +- gcovr>=5.0 +- identify>=2.5.20 +- ninja +- numba>=0.57 +- numpy>=1.21 +- pre-commit +- pytest +- pytest-cov +- python>=3.9,<3.11 +- scikit-build>=0.13.1 +- spdlog>=1.11.0,<1.12 +- tomli +name: all_cuda-120_arch-x86_64 diff --git a/conda/recipes/librmm/conda_build_config.yaml b/conda/recipes/librmm/conda_build_config.yaml index 644924271..59c0a210e 100644 --- a/conda/recipes/librmm/conda_build_config.yaml +++ b/conda/recipes/librmm/conda_build_config.yaml @@ -5,10 +5,13 @@ cxx_compiler_version: - 11 cuda_compiler: + - cuda-nvcc + +cuda11_compiler: - nvcc cmake_version: - - ">=3.23.1,!=3.25.0" + - ">=3.26.4" fmt_version: - ">=9.1.0,<10" diff --git a/conda/recipes/librmm/meta.yaml b/conda/recipes/librmm/meta.yaml index a6b31cdcb..1f7ac40d4 100644 --- a/conda/recipes/librmm/meta.yaml +++ b/conda/recipes/librmm/meta.yaml @@ -18,10 +18,15 @@ requirements: - ninja - {{ compiler('c') }} - {{ compiler('cxx') }} - - {{ compiler('cuda') }} {{ cuda_version }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} {{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} + {% endif %} + - cuda-version ={{ cuda_version }} - sysroot_{{ target_platform }} {{ sysroot_version }} host: - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} # We require spdlog and fmt (which was devendored from spdlog # conda-forge packages in 1.11.0) so that the spdlog headers are not # pulled by CPM and installed as a part of the rmm packages. However, @@ -60,12 +65,17 @@ outputs: run_exports: - {{ pin_subpackage("librmm", max_pin="x.x") }} ignore_run_exports_from: - - {{ compiler('cuda') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% endif %} requirements: build: - cmake {{ cmake_version }} run: - - cudatoolkit {{ cuda_spec }} + {% if cuda_major == "11" %} + - cudatoolkit + {% endif %} + - cuda-version {{ cuda_spec }} - fmt {{ fmt_version }} - spdlog {{ spdlog_version }} test: @@ -113,12 +123,24 @@ outputs: number: {{ GIT_DESCRIBE_NUMBER }} string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} ignore_run_exports_from: - - {{ compiler('cuda') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% endif %} requirements: build: - cmake {{ cmake_version }} + host: + - cuda-version ={{ cuda_version }} + {% if cuda_major == "11" %} + - cudatoolkit + {% else %} + - cuda-cudart-dev + {% endif %} run: - - cudatoolkit {{ cuda_spec }} + {% if cuda_major == "11" %} + - cudatoolkit + {% endif %} + - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - {{ pin_subpackage('librmm', exact=True) }} - gtest {{ gtest_version }} - gmock {{ gtest_version }} diff --git a/conda/recipes/rmm/conda_build_config.yaml b/conda/recipes/rmm/conda_build_config.yaml index ad733ac69..e28b98da7 100644 --- a/conda/recipes/rmm/conda_build_config.yaml +++ b/conda/recipes/rmm/conda_build_config.yaml @@ -5,7 +5,13 @@ cxx_compiler_version: - 11 cuda_compiler: + - cuda-nvcc + +cuda11_compiler: - nvcc sysroot_version: - "2.17" + +cmake_version: + - ">=3.26.4" diff --git a/conda/recipes/rmm/meta.yaml b/conda/recipes/rmm/meta.yaml index 2f59e6839..5d905b853 100644 --- a/conda/recipes/rmm/meta.yaml +++ b/conda/recipes/rmm/meta.yaml @@ -32,30 +32,45 @@ build: - SCCACHE_S3_USE_SSL - SCCACHE_S3_NO_CREDENTIALS ignore_run_exports_from: - - {{ compiler('cuda') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% endif %} requirements: build: - - cmake >=3.23.1,!=3.25.0 + - cmake {{ cmake_version }} - ninja - {{ compiler('c') }} - {{ compiler('cxx') }} - - {{ compiler('cuda') }} {{ cuda_version }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} {{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} + {% endif %} + - cuda-version ={{ cuda_version }} - sysroot_{{ target_platform }} {{ sysroot_version }} host: - - cuda-python >=11.7.1,<12.0 - - cudatoolkit ={{ cuda_version }} + - cuda-version ={{ cuda_version }} + {% if cuda_major == "11" %} + - cudatoolkit + - cuda-python ==11.7.1 + {% else %} + - cuda-cudart-dev + - cuda-python ==12.0.0 + {% endif %} - cython >=0.29,<0.30 - librmm ={{ version }} - python - - scikit-build >=0.13.1,<0.17.2 + - scikit-build >=0.13.1 - setuptools >=61.0.0 - tomli # [py<311] run: - - cuda-python >=11.7.1,<12.0 + {% if cuda_major == "11" %} + - cudatoolkit + {% endif %} + - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - numba >=0.57 - numpy >=1.21 - - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} test: imports: diff --git a/dependencies.yaml b/dependencies.yaml index 5268fcfe6..91eed8280 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -3,7 +3,7 @@ files: all: output: conda matrix: - cuda: ["11.8"] + cuda: ["11.8", "12.0"] arch: [x86_64] includes: - build @@ -61,11 +61,10 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: - - &cmake_ver cmake>=3.23.1,!=3.25.0 - - &cuda_python cuda-python>=11.7.1,<12.0 + - &cmake_ver cmake>=3.26.4 - cython>=0.29,<0.30 - ninja - - scikit-build>=0.13.1,<0.17.2 + - scikit-build>=0.13.1 - tomli - output_types: conda packages: @@ -76,11 +75,41 @@ dependencies: packages: - wheel - setuptools>=61.0.0 + specific: + - output_types: conda + matrices: + - matrix: + arch: x86_64 + cuda: "11.8" + packages: + - nvcc_linux-64=11.8 + - matrix: + arch: aarch64 + cuda: "11.8" + packages: + - nvcc_linux-aarch64=11.8 + - matrix: + cuda: "12.0" + packages: + - cuda-version=12.0 + - cuda-nvcc + - output_types: [conda, requirements, pyproject] + matrices: + - matrix: + cuda: "12.0" + packages: + - &cuda_python12 cuda-python>=12.0,<13.0a0 + - matrix: # All CUDA 11 versions + packages: + - &cuda_python11 cuda-python>=11.7.1,<12.0a0 checks: common: - output_types: [conda, requirements] packages: - pre-commit + # pre-commit requires identify minimum version 1.0, but clang-format requires textproto support and that was + # added in 2.5.20, so we need to call out the minimum version needed for our plugins + - identify>=2.5.20 cudatoolkit: specific: - output_types: conda @@ -88,23 +117,32 @@ dependencies: - matrix: cuda: "11.2" packages: - - cudatoolkit=11.2 + - cuda-version=11.2 + - cudatoolkit - matrix: cuda: "11.4" packages: - - cudatoolkit=11.4 + - cuda-version=11.4 + - cudatoolkit - matrix: cuda: "11.5" packages: - - cudatoolkit=11.5 + - cuda-version=11.5 + - cudatoolkit - matrix: cuda: "11.6" packages: - - cudatoolkit=11.6 + - cuda-version=11.6 + - cudatoolkit - matrix: cuda: "11.8" packages: - - cudatoolkit=11.8 + - cuda-version=11.8 + - cudatoolkit + - matrix: + cuda: "12.0" + packages: + - cuda-version=12.0 develop: common: - output_types: [conda, requirements] @@ -141,7 +179,16 @@ dependencies: packages: - numba>=0.57 - numpy>=1.21 - - *cuda_python + specific: + - output_types: [conda, requirements, pyproject] + matrices: + - matrix: + cuda: "12.0" + packages: + - *cuda_python12 + - matrix: # All CUDA 11 versions + packages: + - *cuda_python11 test_cpp: common: - output_types: conda diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile index e9323a222..264d99df0 100644 --- a/doxygen/Doxyfile +++ b/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "RMM" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 23.06 +PROJECT_NUMBER = 23.08 # 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 diff --git a/include/rmm/detail/error.hpp b/include/rmm/detail/error.hpp index 5d8b340ab..329fa7022 100644 --- a/include/rmm/detail/error.hpp +++ b/include/rmm/detail/error.hpp @@ -95,27 +95,27 @@ class out_of_range : public std::out_of_range { * RMM_EXPECTS(p != nullptr, "Unexpected null pointer"); * * // throws std::runtime_error - * RMM_EXPECTS(p != nullptr, std::runtime_error, "Unexpected nullptr"); + * RMM_EXPECTS(p != nullptr, "Unexpected nullptr", std::runtime_error); * ``` * @param[in] _condition Expression that evaluates to true or false + * @param[in] _what String literal description of why the exception was + * thrown, i.e. why `_condition` was expected to be true. * @param[in] _expection_type The exception type to throw; must inherit * `std::exception`. If not specified (i.e. if only two macro * arguments are provided), defaults to `rmm::logic_error` - * @param[in] _what String literal description of why the exception was - * thrown, i.e. why `_condition` was expected to be true. * @throw `_exception_type` if the condition evaluates to 0 (false). */ #define RMM_EXPECTS(...) \ GET_RMM_EXPECTS_MACRO(__VA_ARGS__, RMM_EXPECTS_3, RMM_EXPECTS_2) \ (__VA_ARGS__) #define GET_RMM_EXPECTS_MACRO(_1, _2, _3, NAME, ...) NAME -#define RMM_EXPECTS_3(_condition, _exception_type, _reason) \ +#define RMM_EXPECTS_3(_condition, _reason, _exception_type) \ (!!(_condition)) ? static_cast(0) \ : throw _exception_type /*NOLINT(bugprone-macro-parentheses)*/ \ { \ "RMM failure at: " __FILE__ ":" RMM_STRINGIFY(__LINE__) ": " _reason \ } -#define RMM_EXPECTS_2(_condition, _reason) RMM_EXPECTS_3(_condition, rmm::logic_error, _reason) +#define RMM_EXPECTS_2(_condition, _reason) RMM_EXPECTS_3(_condition, _reason, rmm::logic_error) /** * @brief Indicates that an erroneous code path has been taken. diff --git a/include/rmm/device_uvector.hpp b/include/rmm/device_uvector.hpp index 93abfa7a7..40f5d8c5d 100644 --- a/include/rmm/device_uvector.hpp +++ b/include/rmm/device_uvector.hpp @@ -208,7 +208,7 @@ class device_uvector { cuda_stream_view stream) { RMM_EXPECTS( - element_index < size(), rmm::out_of_range, "Attempt to access out of bounds element."); + element_index < size(), "Attempt to access out of bounds element.", rmm::out_of_range); if constexpr (std::is_same::value) { RMM_CUDA_TRY( @@ -256,7 +256,7 @@ class device_uvector { void set_element_to_zero_async(std::size_t element_index, cuda_stream_view stream) { RMM_EXPECTS( - element_index < size(), rmm::out_of_range, "Attempt to access out of bounds element."); + element_index < size(), "Attempt to access out of bounds element.", rmm::out_of_range); RMM_CUDA_TRY( cudaMemsetAsync(element_ptr(element_index), 0, sizeof(value_type), stream.value())); } @@ -311,7 +311,7 @@ class device_uvector { [[nodiscard]] value_type element(std::size_t element_index, cuda_stream_view stream) const { RMM_EXPECTS( - element_index < size(), rmm::out_of_range, "Attempt to access out of bounds element."); + element_index < size(), "Attempt to access out of bounds element.", rmm::out_of_range); value_type value; RMM_CUDA_TRY(cudaMemcpyAsync( &value, element_ptr(element_index), sizeof(value), cudaMemcpyDefault, stream.value())); diff --git a/include/rmm/logger.hpp b/include/rmm/logger.hpp index a12e7238e..d0d6f8fa4 100644 --- a/include/rmm/logger.hpp +++ b/include/rmm/logger.hpp @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/include/rmm/mr/device/detail/stream_ordered_memory_resource.hpp b/include/rmm/mr/device/detail/stream_ordered_memory_resource.hpp index 69932913d..53575e5ce 100644 --- a/include/rmm/mr/device/detail/stream_ordered_memory_resource.hpp +++ b/include/rmm/mr/device/detail/stream_ordered_memory_resource.hpp @@ -212,8 +212,8 @@ class stream_ordered_memory_resource : public crtp, public device_ size = rmm::detail::align_up(size, rmm::detail::CUDA_ALLOCATION_ALIGNMENT); RMM_EXPECTS(size <= this->underlying().get_maximum_allocation_size(), - rmm::out_of_memory, - "Maximum allocation size exceeded"); + "Maximum allocation size exceeded", + rmm::out_of_memory); auto const block = this->underlying().get_block(size, stream_event); RMM_LOG_TRACE("[A][stream {:p}][{}B][{:p}]", diff --git a/include/rmm/mr/device/device_memory_resource.hpp b/include/rmm/mr/device/device_memory_resource.hpp index e3ab954b5..4778d9bda 100644 --- a/include/rmm/mr/device/device_memory_resource.hpp +++ b/include/rmm/mr/device/device_memory_resource.hpp @@ -105,7 +105,7 @@ class device_memory_resource { */ void* allocate(std::size_t bytes, cuda_stream_view stream = cuda_stream_view{}) { - return do_allocate(rmm::detail::align_up(bytes, allocation_size_alignment), stream); + return do_allocate(bytes, stream); } /** @@ -128,7 +128,7 @@ class device_memory_resource { */ void deallocate(void* ptr, std::size_t bytes, cuda_stream_view stream = cuda_stream_view{}) { - do_deallocate(ptr, rmm::detail::align_up(bytes, allocation_size_alignment), stream); + do_deallocate(ptr, bytes, stream); } /** @@ -178,9 +178,6 @@ class device_memory_resource { } private: - // All allocations are padded to a multiple of allocation_size_alignment bytes. - static constexpr auto allocation_size_alignment = std::size_t{8}; - /** * @brief Allocates memory of size at least \p bytes. * diff --git a/pyproject.toml b/pyproject.toml index 8a412773e..285098f99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,3 +7,16 @@ ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b" ignore-words-list = "inout" builtin = "clear" quiet-level = 3 + +[tool.ruff] +select = ["E", "F", "W"] +ignore = [ + # whitespace before : + "E203", +] +fixable = ["ALL"] +exclude = [ + # TODO: Remove this in a follow-up where we fix __all__. + "__init__.py", +] +line-length = 79 diff --git a/python/.flake8 b/python/.flake8 deleted file mode 100644 index 4d610ba8e..000000000 --- a/python/.flake8 +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. - -[flake8] -filename = *.py, *.pyx, *.pxd, *.pxi -exclude = __init__.py, *.egg, build, docs, .git -force-check = True -ignore = - # line break before binary operator - W503, - # whitespace before : - E203 -per-file-ignores = - # Rules ignored only in Cython: - # E211: whitespace before '(' (used in multi-line imports) - # E225: Missing whitespace around operators (breaks cython casting syntax like ) - # E226: Missing whitespace around arithmetic operators (breaks cython pointer syntax like int*) - # E227: Missing whitespace around bitwise or shift operator (Can also break casting syntax) - # E275: Missing whitespace after keyword (Doesn't work with Cython except?) - # E402: invalid syntax (works for Python, not Cython) - # E999: invalid syntax (works for Python, not Cython) - # W504: line break after binary operator (breaks lines that end with a pointer) - *.pyx: E211, E225, E226, E227, E275, E402, E999, W504 - *.pxd: E211, E225, E226, E227, E275, E402, E999, W504 - *.pxi: E211, E225, E226, E227, E275, E402, E999, W504 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 5950f3c21..b26a6dd43 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -12,11 +12,11 @@ # the License. # ============================================================================= -cmake_minimum_required(VERSION 3.23.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -set(rmm_version 23.06.00) +set(rmm_version 23.08.00) -file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.06/RAPIDS.cmake +file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.08/RAPIDS.cmake ${CMAKE_BINARY_DIR}/RAPIDS.cmake) include(${CMAKE_BINARY_DIR}/RAPIDS.cmake) diff --git a/python/docs/conf.py b/python/docs/conf.py index 8c014d8d5..f6f3adf43 100644 --- a/python/docs/conf.py +++ b/python/docs/conf.py @@ -23,9 +23,9 @@ # built documents. # # The short X.Y version. -version = "23.06" +version = "23.08" # The full version, including alpha/beta/rc tags. -release = "23.06.00" +release = "23.08.00" # -- General configuration --------------------------------------------------- diff --git a/python/pyproject.toml b/python/pyproject.toml index 128849888..58ac1d5ad 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -15,11 +15,11 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "cmake>=3.23.1,!=3.25.0", - "cuda-python>=11.7.1,<12.0", + "cmake>=3.26.4", + "cuda-python>=11.7.1,<12.0a0", "cython>=0.29,<0.30", "ninja", - "scikit-build>=0.13.1,<0.17.2", + "scikit-build>=0.13.1", "setuptools>=61.0.0", "tomli", "wheel", @@ -27,7 +27,7 @@ requires = [ [project] name = "rmm" -version = "23.06.00" +version = "23.08.00" description = "rmm - RAPIDS Memory Manager" readme = { file = "README.md", content-type = "text/markdown" } authors = [ @@ -36,7 +36,7 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cuda-python>=11.7.1,<12.0", + "cuda-python>=11.7.1,<12.0a0", "numba>=0.57", "numpy>=1.21", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. diff --git a/python/rmm/__init__.py b/python/rmm/__init__.py index 01b037bd8..a5467251e 100644 --- a/python/rmm/__init__.py +++ b/python/rmm/__init__.py @@ -36,32 +36,4 @@ "unregister_reinitialize_hook", ] -__version__ = "23.06.00" - - -_deprecated_names = { - "rmm_cupy_allocator": "cupy", - "rmm_torch_allocator": "torch", - "RMMNumbaManager": "numba", - "_numba_memory_manager": "numba", -} - - -def __getattr__(name): - if name in _deprecated_names: - import importlib - import warnings - - package = _deprecated_names[name] - warnings.warn( - f"Use of 'rmm.{name}' is deprecated and will be removed. " - f"'{name}' now lives in the 'rmm.allocators.{package}' sub-module, " - "please update your imports.", - FutureWarning, - ) - module = importlib.import_module( - f".allocators.{package}", package=__name__ - ) - return getattr(module, name) - else: - raise AttributeError(f"Module '{__name__}' has no attribute '{name}'") +__version__ = "23.08.00" diff --git a/tests/logger_tests.cpp b/tests/logger_tests.cpp index 49f5f83c6..f6531bc59 100644 --- a/tests/logger_tests.cpp +++ b/tests/logger_tests.cpp @@ -65,11 +65,11 @@ class raii_temp_directory { public: raii_temp_directory() { - directory_path_ = std::filesystem::temp_directory_path(); - std::string unique_dir_name = "rmm_XXXXXX"; - auto const ptr = mkdtemp(const_cast(unique_dir_name.data())); + std::string random_path{std::filesystem::temp_directory_path().string()}; + random_path += "/rmm_XXXXXX"; + auto const ptr = mkdtemp(const_cast(random_path.data())); EXPECT_TRUE((ptr != nullptr)); - directory_path_ /= unique_dir_name; + directory_path_ = std::filesystem::path{random_path}; } ~raii_temp_directory() { std::filesystem::remove_all(directory_path_); } @@ -113,7 +113,7 @@ void expect_log_events(std::string const& filename, // EXPECT_EQ(expected.stream, actual.stream); EXPECT_EQ(expected.act, actual.act); // device_memory_resource automatically pads an allocation to a multiple of 8 bytes - EXPECT_EQ(rmm::detail::align_up(expected.size, 8), actual.size); + EXPECT_EQ(expected.size, actual.size); EXPECT_EQ(expected.pointer, actual.pointer); return true; }); diff --git a/tests/mr/device/aligned_mr_tests.cpp b/tests/mr/device/aligned_mr_tests.cpp index 62b941d6f..dfcdfa72f 100644 --- a/tests/mr/device/aligned_mr_tests.cpp +++ b/tests/mr/device/aligned_mr_tests.cpp @@ -87,9 +87,8 @@ TEST(AlignedTest, DefaultAllocationAlignmentPassthrough) cuda_stream_view stream; void* const pointer = int_to_address(123); - // device_memory_resource aligns to 8. { - auto const size{8}; + auto const size{5}; EXPECT_CALL(mock, do_allocate(size, stream)).WillOnce(Return(pointer)); EXPECT_CALL(mock, do_deallocate(pointer, size, stream)).Times(1); } @@ -110,9 +109,8 @@ TEST(AlignedTest, BelowAlignmentThresholdPassthrough) cuda_stream_view stream; void* const pointer = int_to_address(123); - // device_memory_resource aligns to 8. { - auto const size{8}; + auto const size{3}; EXPECT_CALL(mock, do_allocate(size, stream)).WillOnce(Return(pointer)); EXPECT_CALL(mock, do_deallocate(pointer, size, stream)).Times(1); }