Skip to content

Commit

Permalink
Merge branch 'branch-25.04' into doxygen-fix-host-memmory-resource
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice authored Feb 11, 2025
2 parents db1bb0b + ac8a99b commit cc837a2
Show file tree
Hide file tree
Showing 36 changed files with 256 additions and 176 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -56,7 +56,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -68,7 +68,7 @@ jobs:
run_script: "ci/build_docs.sh"
wheel-build-cpp:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
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 @@ -79,7 +79,7 @@ jobs:
wheel-build-python:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -89,7 +89,7 @@ jobs:
wheel-publish-cpp:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -100,7 +100,7 @@ jobs:
wheel-publish-python:
needs: wheel-build-python
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
24 changes: 12 additions & 12 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@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.04
if: always()
with:
needs: ${{ toJSON(needs) }}
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
needs:
- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@branch-25.04
with:
files_yaml: |
test_cpp:
Expand All @@ -79,40 +79,40 @@ jobs:
secrets: inherit
needs:
- telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-25.04
with:
enable_check_generated_files: false
ignored_pr_jobs: telemetry-summarize
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04
with:
build_type: pull-request
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-25.04
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04
with:
build_type: pull-request
conda-python-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.04
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
Expand All @@ -122,22 +122,22 @@ jobs:
wheel-build-cpp:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: pull-request
script: ci/build_wheel_cpp.sh
wheel-build-python:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
build_type: pull-request
script: ci/build_wheel_python.sh
wheel-tests:
needs: [wheel-build-python, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.04
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
Expand All @@ -146,7 +146,7 @@ jobs:
secrets: inherit
needs:
- telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-25.04
with:
arch: '["amd64"]'
cuda: '["12.8"]'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ on:
jobs:
cpp-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-25.04
with:
build_type: nightly
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.04
with:
build_type: nightly
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.04
with:
build_type: nightly
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-breaking-change-alert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
trigger-notifier:
if: contains(github.event.pull_request.labels.*.name, 'breaking')
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@branch-25.04
with:
sender_login: ${{ github.event.sender.login }}
sender_avatar: ${{ github.event.sender.avatar_url }}
Expand Down
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ rapids_find_package(
rapids_cpm_init()

include(${rapids-cmake-dir}/cpm/rapids_logger.cmake)
rapids_cpm_rapids_logger()
rapids_make_logger(rmm EXPORT_SET rmm-exports)
rapids_cpm_rapids_logger(BUILD_EXPORT_SET rmm-exports INSTALL_EXPORT_SET rmm-exports)
create_logger_macros(RMM "rmm::default_logger()" include/rmm)

include(cmake/thirdparty/get_cccl.cmake)
include(cmake/thirdparty/get_nvtx.cmake)
Expand All @@ -86,8 +86,10 @@ include(cmake/thirdparty/get_nvtx.cmake)
add_library(rmm INTERFACE)
add_library(rmm::rmm ALIAS rmm)

target_include_directories(rmm INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(
rmm
INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>" "$<INSTALL_INTERFACE:include>")

if(CUDA_STATIC_RUNTIME)
message(STATUS "RMM: Enabling static linking of cudart")
Expand All @@ -96,10 +98,10 @@ else()
target_link_libraries(rmm INTERFACE CUDA::cudart)
endif()

target_link_libraries(rmm INTERFACE rmm_logger)
target_link_libraries(rmm INTERFACE CCCL::CCCL)
target_link_libraries(rmm INTERFACE dl)
target_link_libraries(rmm INTERFACE nvtx3::nvtx3-cpp)
target_link_libraries(rmm INTERFACE rapids_logger::rapids_logger)
target_compile_features(rmm INTERFACE cxx_std_17 $<BUILD_INTERFACE:cuda_std_17>)
target_compile_definitions(rmm INTERFACE LIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE)

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,17 +645,16 @@ set to `True`. The log file name can be set using the `log_file_name` parameter.
### Debug Logging
RMM includes a debug logger which can be enabled to log trace and debug information to a file. This
information can show when errors occur, when additional memory is allocated from upstream resources,
etc. By default output is logged to stderr, but the environment variable
`RMM_DEBUG_LOG_FILE` can be set to specify a path and file name to dump the logs to instead.
RMM leverages [`rapids-logger`](https://github.com/rapidsai/rapids-logger) to log trace and debug
information to a file. This information can show when errors occur, when additional memory is
allocated from upstream resources, etc. By default output is logged to stderr, but the environment
variable `RMM_DEBUG_LOG_FILE` can be set to specify a path and file name to dump the logs to
instead.
There is a CMake configuration variable `RMM_LOGGING_LEVEL`, which can be set to enable compilation
of more detailed logging. The default is `INFO`. Available levels are `TRACE`, `DEBUG`, `INFO`,
`WARN`, `ERROR`, `CRITICAL` and `OFF`.
The log relies on the [spdlog](https://github.com/gabime/spdlog.git) library.
Note that to see logging below the `INFO` level, the application must also set the logging level at
run time. C++ applications must must call `rmm::default_logger().set_level()`, for example to enable all
levels of logging down to `TRACE`, call `rmm::default_logger().set_level(spdlog::level::trace)` (and compile
Expand Down
8 changes: 1 addition & 7 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2018-2024, NVIDIA CORPORATION.
# Copyright (c) 2018-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -45,8 +45,6 @@ function(ConfigureBench BENCH_NAME)
target_compile_options(${BENCH_NAME} PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall -Werror
-Wno-unknown-pragmas>)

target_link_libraries(${BENCH_NAME} PRIVATE rmm_bench_logger)

if(DISABLE_DEPRECATION_WARNING)
target_compile_options(
${BENCH_NAME} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-Wno-deprecated-declarations>)
Expand All @@ -61,10 +59,6 @@ function(ConfigureBench BENCH_NAME)
EXCLUDE_FROM_ALL)
endfunction(ConfigureBench)

# Create an object library for the logger so that we don't have to recompile it.
add_library(rmm_bench_logger OBJECT)
target_link_libraries(rmm_bench_logger PRIVATE rmm_logger_impl)

# random allocations benchmark
ConfigureBench(RANDOM_ALLOCATIONS_BENCH random_allocations/random_allocations.cpp)

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/replay/replay.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
* Copyright (c) 2020-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -403,7 +403,7 @@ int main(int argc, char** argv)
auto const num_threads = per_thread_events.size();

// Uncomment to enable / change default log level
// rmm::logger().set_level(rmm::level_enum::trace);
// rmm::logger().set_level(rapids_logger::level_enum::trace);

if (args.count("resource") > 0) {
std::string mr_name = args["resource"].as<std::string>();
Expand Down
2 changes: 1 addition & 1 deletion ci/build_wheel_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd "${package_dir}"

sccache --zero-stats

python -m pip wheel . -w dist -v --no-deps --disable-pip-version-check
rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check

sccache --show-adv-stats

Expand Down
7 changes: 5 additions & 2 deletions ci/build_wheel_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ echo "librmm-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${CPP_WHEELHOUSE}"/librmm
sccache --zero-stats

PIP_CONSTRAINT="${PWD}/build-constraints.txt" \
python -m pip wheel . -w dist -v --no-deps --disable-pip-version-check
rapids-pip-retry wheel . -w dist -v --no-deps --disable-pip-version-check

sccache --show-adv-stats

mkdir -p final_dist
python -m auditwheel repair -w final_dist dist/*
EXCLUDE_ARGS=(
--exclude "librapids_logger.so"
)
python -m auditwheel repair "${EXCLUDE_ARGS[@]}" -w final_dist dist/*

../../ci/validate_wheel.sh final_dist

Expand Down
13 changes: 1 addition & 12 deletions ci/check_symbols.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2024-2025, NVIDIA CORPORATION.

set -eEuo pipefail

Expand Down Expand Up @@ -47,17 +47,6 @@ for dso_file in ${dso_files}; do
echo " * WEAK: $(grep --count -E ' WEAK ' < ${symbol_file})"
echo " * LOCAL: $(grep --count -E ' LOCAL ' < ${symbol_file})"

echo "checking for 'fmt::' symbols..."
if grep -E 'fmt\:\:' < "${symbol_file}"; then
raise-symbols-found-error 'fmt::'
fi

echo "checking for 'spdlog::' symbols..."
if grep -E 'spdlog\:\:' < "${symbol_file}" \
| grep -v 'std\:\:_Destroy_aux'
then
raise-symbols-found-error 'spdlog::'
fi
echo "No symbol visibility issues found"
done

Expand Down
4 changes: 3 additions & 1 deletion ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ set -eou pipefail

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
WHEELHOUSE="${PWD}/dist/"
RAPIDS_PY_WHEEL_NAME="rmm_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp "${WHEELHOUSE}"
RAPIDS_PY_WHEEL_NAME="rmm_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python "${WHEELHOUSE}"

# generate constraints (possibly pinning to oldest support versions of dependencies)
rapids-generate-pip-constraints test_python ./constraints.txt

# echo to expand wildcard before adding '[extra]' requires for pip
python -m pip install \
rapids-pip-retry install \
-v \
--constraint ./constraints.txt \
"$(echo "${WHEELHOUSE}"/librmm_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \
"$(echo "${WHEELHOUSE}"/rmm_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]"

python -m pytest ./python/rmm/rmm/tests
Loading

0 comments on commit cc837a2

Please sign in to comment.