Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
cpp-build:
needs: [telemetry-setup]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@wsl
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -63,7 +63,7 @@ jobs:
python-build:
needs: [telemetry-setup, cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@wsl
with:
# Build a conda package for each CUDA x ARCH x minimum supported Python version
matrix_filter: group_by({CUDA_VER, ARCH}) | map(min_by(.PY_VER | split(".") | map(tonumber)))
Expand All @@ -75,7 +75,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@wsl
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -85,7 +85,7 @@ jobs:
if: github.ref_type == 'branch'
needs: [python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@wsl
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -98,7 +98,7 @@ jobs:
wheel-build-cpp:
needs: [telemetry-setup]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@wsl
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: ${{ inputs.build_type || 'branch' }}
Expand All @@ -112,7 +112,7 @@ jobs:
wheel-build-python:
needs: [telemetry-setup, wheel-build-cpp]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@wsl
with:
# Build a wheel for each CUDA x ARCH x minimum supported Python version
matrix_filter: group_by({CUDA_VER, ARCH}) | map(min_by(.PY_VER | split(".") | map(tonumber)))
Expand All @@ -127,7 +127,7 @@ jobs:
wheel-publish-cpp:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@wsl
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -138,7 +138,7 @@ jobs:
wheel-publish-python:
needs: wheel-build-python
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@wsl
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- devcontainer
- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@wsl
Comment thread
bdice marked this conversation as resolved.
if: always()
with:
needs: ${{ toJSON(needs) }}
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
needs:
- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@wsl
with:
files_yaml: |
build_docs:
Expand Down Expand Up @@ -188,30 +188,30 @@ jobs:
secrets: inherit
needs:
- telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@wsl
with:
enable_check_generated_files: false
ignored_pr_jobs: "telemetry-summarize conda-python-tests-integration-optional wheel-tests-integration-optional"
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@wsl
with:
build_type: pull-request
node_type: cpu8
script: ci/build_cpp.sh
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
script: ci/test_cpp.sh
conda-cpp-debug-tests:
needs: [checks, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
Expand All @@ -222,7 +222,7 @@ jobs:
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@wsl
with:
build_type: pull-request
script: ci/build_python.sh
Expand All @@ -231,23 +231,23 @@ jobs:
conda-python-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda
with:
build_type: pull-request
script: ci/test_python.sh
conda-python-tests-integration-optional:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda
with:
build_type: pull-request
script: ci/test_python_integrations.sh
docs-build:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).build_docs
with:
build_type: pull-request
Expand All @@ -258,7 +258,7 @@ jobs:
wheel-build-cpp:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@wsl
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: pull-request
Expand All @@ -269,7 +269,7 @@ jobs:
wheel-build-python:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@wsl
with:
# Build a wheel for each CUDA x ARCH x minimum supported Python version
matrix_filter: group_by({CUDA_VER, ARCH}) | map(min_by(.PY_VER | split(".") | map(tonumber)))
Expand All @@ -281,15 +281,15 @@ jobs:
wheel-tests:
needs: [wheel-build-python, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels
with:
build_type: pull-request
script: ci/test_wheel.sh
wheel-tests-integration-optional:
needs: [wheel-build-python, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@wsl
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels
with:
build_type: pull-request
Expand All @@ -298,7 +298,7 @@ jobs:
secrets: inherit
needs:
- telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@wsl
with:
arch: '["amd64", "arm64"]'
cuda: '["13.1"]'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
cpp-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@wsl
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand All @@ -34,7 +34,7 @@ jobs:
sha: ${{ inputs.sha }}
cpp-debug-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@wsl
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
script: "ci/test_cpp_debug.sh"
python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@wsl
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand All @@ -55,7 +55,7 @@ jobs:
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@wsl
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand Down
11 changes: 8 additions & 3 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail
Expand Down Expand Up @@ -33,14 +33,19 @@ set -u

rapids-print-env

rapids-logger "Check GPU usage"
rapids-logger "Check system info"
uname -a
nvidia-smi

# Run librmm gtests from librmm-tests package
rapids-logger "Run gtests"

export GTEST_OUTPUT=xml:${RAPIDS_TESTS_DIR}/
timeout 15m ./ci/run_ctests.sh -j20 && EXITCODE=$? || EXITCODE=$?;
CTEST_TIMEOUT=15m
if grep -qi microsoft /proc/version 2>/dev/null; then
CTEST_TIMEOUT=30m # WSL is slow for large device memory allocations
fi
timeout "${CTEST_TIMEOUT}" ./ci/run_ctests.sh -j20 && EXITCODE=$? || EXITCODE=$?;

# Run all examples from librmm-example package
for example in "${CONDA_PREFIX}"/bin/examples/librmm/*; do
Expand Down
3 changes: 2 additions & 1 deletion ci/test_cpp_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ set -u

rapids-print-env

rapids-logger "Check GPU usage"
rapids-logger "Check system info"
uname -a
nvidia-smi

rapids-logger "Building librmm in Debug mode"
Expand Down
3 changes: 2 additions & 1 deletion ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ 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}"

rapids-logger "Check GPU usage"
rapids-logger "Check system info"
uname -a
nvidia-smi

rapids-logger "pytest rmm"
Expand Down
3 changes: 2 additions & 1 deletion ci/test_python_integrations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ 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}"

rapids-logger "Check GPU usage"
rapids-logger "Check system info"
uname -a
nvidia-smi

EXITCODE=0
Expand Down
3 changes: 2 additions & 1 deletion ci/test_wheel_integrations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ PIP_INSTALL_SHARED_ARGS=(

EXITCODE=0

rapids-logger "Check GPU usage"
rapids-logger "Check system info"
uname -a
nvidia-smi

echo "::group::PyTorch Tests"
Expand Down
9 changes: 7 additions & 2 deletions cpp/include/rmm/mr/arena_memory_resource.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
Expand Down Expand Up @@ -155,8 +155,13 @@ class arena_memory_resource final : public device_memory_resource {
void* pointer = arena.allocate_sync(bytes);
if (pointer == nullptr) {
if (dump_log_on_failure_) { dump_memory_log(bytes); }
auto const [free_memory, total_memory] = rmm::available_device_memory();
auto const msg = std::string("Maximum pool size exceeded (failed to allocate ") +
rmm::detail::format_bytes(bytes) + "): No room in arena.";
rmm::detail::format_bytes(bytes) +
", arena size=" + rmm::detail::format_bytes(global_arena_.size()) +
", device free=" + rmm::detail::format_bytes(free_memory) +
" total=" + rmm::detail::format_bytes(total_memory) +
"): No room in arena.";
RMM_FAIL(msg.c_str(), rmm::out_of_memory);
}
return pointer;
Expand Down
9 changes: 8 additions & 1 deletion cpp/include/rmm/mr/detail/arena.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -517,6 +517,13 @@ class global_arena final {
upstream_mr_.deallocate_sync(upstream_block_.pointer(), upstream_block_.size());
}

/**
* @brief Returns the total size of the global arena in bytes.
*
* @return std::size_t The size of the upstream block allocated for the arena.
*/
[[nodiscard]] std::size_t size() const noexcept { return upstream_block_.size(); }

/**
* @brief Should allocation of `size` bytes be handled by the global arena directly?
*
Expand Down
23 changes: 18 additions & 5 deletions cpp/include/rmm/mr/pool_memory_resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,25 @@ class pool_memory_resource final
block_type try_to_expand(std::size_t try_size, std::size_t min_size, cuda_stream_view stream)
{
auto report_error = [&](const char* reason) {
RMM_LOG_ERROR("[A][Stream %s][Upstream %zuB][FAILURE maximum pool size exceeded: %s]",
rmm::detail::format_stream(stream),
min_size,
reason);
auto const max_size = maximum_pool_size_.value_or(std::numeric_limits<std::size_t>::max());
auto const [free_memory, total_memory] = rmm::available_device_memory();
RMM_LOG_ERROR(
"[A][Stream %s][Upstream %zuB][FAILURE maximum pool size exceeded: %s]"
"[Pool current=%s max=%s][Device free=%s total=%s]",
rmm::detail::format_stream(stream),
min_size,
reason,
rmm::detail::format_bytes(pool_size()),
rmm::detail::format_bytes(max_size),
rmm::detail::format_bytes(free_memory),
rmm::detail::format_bytes(total_memory));
auto const msg = std::string("Maximum pool size exceeded (failed to allocate ") +
rmm::detail::format_bytes(min_size) + std::string("): ") + reason;
rmm::detail::format_bytes(min_size) +
", pool current=" + rmm::detail::format_bytes(pool_size()) +
" max=" + rmm::detail::format_bytes(max_size) +
", device free=" + rmm::detail::format_bytes(free_memory) +
" total=" + rmm::detail::format_bytes(total_memory) + std::string("): ") +
reason;
RMM_FAIL(msg.c_str(), rmm::out_of_memory);
};

Expand Down
Loading
Loading