Skip to content

Commit a828642

Browse files
authored
Move RMM C++ code into cpp directory. (#1883)
Restructures RMM to use a `cpp/` directory like most RAPIDS repos. Closes #1877. rapidsai/devcontainers#490 should be merged just before this PR. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Rong Ou (https://github.com/rongou) - Mark Harris (https://github.com/harrism) - Matthew Murray (https://github.com/Matt711) - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: #1883
1 parent 8bae350 commit a828642

File tree

145 files changed

+30
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+30
-34
lines changed

.github/workflows/pr.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ jobs:
153153
arch: '["amd64"]'
154154
cuda: '["12.8"]'
155155
build_command: |
156+
mkdir -p telemetry-artifacts;
156157
sccache --zero-stats;
157158
build-all -DBUILD_BENCHMARKS=ON --verbose 2>&1 | tee telemetry-artifacts/build.log;
158159
sccache --show-adv-stats | tee telemetry-artifacts/sccache-stats.txt;

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ thirdparty/googletest/
9595
*.iws
9696

9797
## Doxygen
98-
doxygen/html
99-
doxygen/xml
98+
cpp/doxygen/html
99+
cpp/doxygen/xml
100100

101101
#Java
102102
target

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
- id: fix-smartquotes
3737
exclude: |
3838
(?x)^(
39-
^benchmarks/utilities/cxxopts.hpp
39+
^cpp/benchmarks/utilities/cxxopts.hpp
4040
)
4141
- repo: https://github.com/codespell-project/codespell
4242
rev: v2.4.1
@@ -46,14 +46,14 @@ repos:
4646
args: ["--toml", "pyproject.toml"]
4747
exclude: |
4848
(?x)^(
49-
pyproject.toml|
50-
benchmarks/utilities/cxxopts.hpp
49+
^pyproject.toml|
50+
^cpp/benchmarks/utilities/cxxopts.hpp
5151
)
5252
- repo: local
5353
hooks:
5454
- id: cmake-format
5555
name: cmake-format
56-
entry: ./scripts/run-cmake-format.sh cmake-format
56+
entry: ./cpp/scripts/run-cmake-format.sh cmake-format
5757
language: python
5858
types: [cmake]
5959
# Note that pre-commit autoupdate does not update the versions
@@ -62,7 +62,7 @@ repos:
6262
- cmakelang==0.6.13
6363
- id: cmake-lint
6464
name: cmake-lint
65-
entry: ./scripts/run-cmake-format.sh cmake-lint
65+
entry: ./cpp/scripts/run-cmake-format.sh cmake-lint
6666
language: python
6767
types: [cmake]
6868
# Note that pre-commit autoupdate does not update the versions
@@ -71,7 +71,7 @@ repos:
7171
- cmakelang==0.6.13
7272
- id: doxygen-check
7373
name: doxygen-check
74-
entry: ./scripts/doxygen.sh
74+
entry: ./cpp/scripts/doxygen.sh
7575
types_or: [file]
7676
language: system
7777
pass_filenames: false

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
3+
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
44

55
# rmm build script
66

@@ -35,7 +35,7 @@ HELP="$0 [clean] [librmm] [rmm] [-v] [-g] [-n] [-s] [--ptds] [--cmake-args=\"<ar
3535
3636
default action (no args) is to build and install 'librmm' and 'rmm' targets
3737
"
38-
LIBRMM_BUILD_DIR=${LIBRMM_BUILD_DIR:=${REPODIR}/build}
38+
LIBRMM_BUILD_DIR=${LIBRMM_BUILD_DIR:=${REPODIR}/cpp/build}
3939
RMM_BUILD_DIR="${REPODIR}/python/rmm/build"
4040
BUILD_DIRS="${LIBRMM_BUILD_DIR} ${RMM_BUILD_DIR}"
4141

@@ -88,7 +88,7 @@ function ensureCMakeRan {
8888
mkdir -p "${LIBRMM_BUILD_DIR}"
8989
if (( RAN_CMAKE == 0 )); then
9090
echo "Executing cmake for librmm..."
91-
cmake -B "${LIBRMM_BUILD_DIR}" -S . \
91+
cmake -S ${REPODIR}/cpp -B "${LIBRMM_BUILD_DIR}" \
9292
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
9393
-DCUDA_STATIC_RUNTIME="${CUDA_STATIC_RUNTIME}" \
9494
-DPER_THREAD_DEFAULT_STREAM="${PER_THREAD_DEFAULT_STREAM}" \

ci/build_cpp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache
4040

4141
# Run the libcudacxx flag test at build time, since compilers are available
4242
rapids-logger "Run libcudacxx_flag_test"
43-
./tests/libcudacxx_flag_test/libcudacxx_flag_test.sh
43+
./cpp/tests/libcudacxx_flag_test/libcudacxx_flag_test.sh
4444

4545
rapids-upload-conda-to-s3 cpp

ci/build_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export RAPIDS_DOCS_DIR
3232

3333

3434
rapids-logger "Build CPP docs"
35-
pushd doxygen
35+
pushd cpp/doxygen
3636
doxygen Doxyfile
3737
mkdir -p "${RAPIDS_DOCS_DIR}/librmm/html"
3838
mv html/* "${RAPIDS_DOCS_DIR}/librmm/html"

ci/release/update-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function sed_runner() {
3333
echo "${NEXT_FULL_TAG}" > VERSION
3434

3535
# Examples update
36-
sed_runner "s/RMM_TAG branch-[0-9.]*/RMM_TAG branch-${NEXT_SHORT_TAG}/" examples/versions.cmake
36+
sed_runner "s/RMM_TAG branch-[0-9.]*/RMM_TAG branch-${NEXT_SHORT_TAG}/" cpp/examples/versions.cmake
3737

3838
# CI files
3939
for FILE in .github/workflows/*.yaml; do

conda/recipes/librmm/recipe.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ outputs:
6666
build:
6767
string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }}
6868
script:
69-
- cmake --install build
69+
- cmake --install cpp/build
7070
dynamic_linking:
7171
overlinking_behavior: "error"
7272
requirements:
@@ -99,7 +99,7 @@ outputs:
9999
version: ${{ version }}
100100
build:
101101
string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }}
102-
script: cmake --install build --component testing
102+
script: cmake --install cpp/build --component testing
103103
dynamic_linking:
104104
overlinking_behavior: "error"
105105
missing_dso_allowlist:
@@ -143,7 +143,7 @@ outputs:
143143
string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }}
144144
script:
145145
content: |
146-
./examples/build.sh --install
146+
./cpp/examples/build.sh --install
147147
env:
148148
CMAKE_C_COMPILER_LAUNCHER: ${{ env.get("CMAKE_C_COMPILER_LAUNCHER") }}
149149
CMAKE_CUDA_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CUDA_COMPILER_LAUNCHER") }}
File renamed without changes.

.clangd renamed to cpp/.clangd

File renamed without changes.

CMakeLists.txt renamed to cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR)
1616

17-
include(cmake/rapids_config.cmake)
17+
include(../cmake/rapids_config.cmake)
1818

1919
include(rapids-cmake)
2020
include(rapids-cpm)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/set_cuda_architecture.cmake renamed to cpp/examples/set_cuda_architecture.cmake

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
# =============================================================================
1414

1515
include(${CMAKE_CURRENT_LIST_DIR}/versions.cmake)
16-
17-
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/librmm_cpp_examples_RAPIDS.cmake)
18-
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/${RMM_TAG}/RAPIDS.cmake
19-
${CMAKE_CURRENT_BINARY_DIR}/librmm_cpp_examples_RAPIDS.cmake)
20-
endif()
21-
include(${CMAKE_CURRENT_BINARY_DIR}/librmm_cpp_examples_RAPIDS.cmake)
16+
include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/rapids_config.cmake)
2217

2318
include(rapids-cmake)
2419
include(rapids-cpm)
File renamed without changes.

gcovr.cfg renamed to cpp/gcovr.cfg

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

scripts/doxygen.sh renamed to cpp/scripts/doxygen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2023, NVIDIA CORPORATION.
2+
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
33
##############################
44
# RMM doxygen warnings check #
55
##############################
@@ -27,7 +27,7 @@ export RAPIDS_VERSION_MAJOR_MINOR="$(sed -E -e 's/^([0-9]{2})\.([0-9]{2})\.([0-9
2727
# Run doxygen, ignore missing tag files error
2828
TAG_ERROR1="error: Tag file '.*.tag' does not exist or is not a file. Skipping it..."
2929
TAG_ERROR2="error: cannot open tag file .*.tag for writing"
30-
DOXYGEN_STDERR=`cd doxygen && { cat Doxyfile ; echo QUIET = YES; echo GENERATE_HTML = NO; } | doxygen - 2>&1 | sed "/\($TAG_ERROR1\|$TAG_ERROR2\)/d"`
30+
DOXYGEN_STDERR=`cd cpp/doxygen && { cat Doxyfile ; echo QUIET = YES; echo GENERATE_HTML = NO; } | doxygen - 2>&1 | sed "/\($TAG_ERROR1\|$TAG_ERROR2\)/d"`
3131
RETVAL=$?
3232

3333
if [ "$RETVAL" != "0" ] || [ ! -z "$DOXYGEN_STDERR" ]; then
File renamed without changes.
File renamed without changes.

scripts/run-cmake-format.sh renamed to cpp/scripts/run-cmake-format.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2024, NVIDIA CORPORATION.
2+
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
33

44
# This script is a wrapper for cmakelang that may be used with pre-commit. The
55
# wrapping is necessary because RAPIDS libraries split configuration for
@@ -26,7 +26,7 @@
2626

2727
status=0
2828
if [ -z ${RMM_ROOT:+PLACEHOLDER} ]; then
29-
RMM_BUILD_DIR=$(git rev-parse --show-toplevel 2>&1)/build
29+
RMM_BUILD_DIR=$(git rev-parse --show-toplevel 2>&1)/cpp/build
3030
status=$?
3131
else
3232
RMM_BUILD_DIR=${RMM_ROOT}
@@ -68,7 +68,7 @@ else
6868
fi
6969

7070
if [[ $1 == "cmake-format" ]]; then
71-
cmake-format -i --config-files cmake/config.json ${RAPIDS_CMAKE_FORMAT_FILE} -- ${@:2}
71+
cmake-format -i --config-files cpp/cmake/config.json ${RAPIDS_CMAKE_FORMAT_FILE} -- ${@:2}
7272
elif [[ $1 == "cmake-lint" ]]; then
73-
cmake-lint --config-files cmake/config.json ${RAPIDS_CMAKE_FORMAT_FILE} -- ${@:2}
73+
cmake-lint --config-files cpp/cmake/config.json ${RAPIDS_CMAKE_FORMAT_FILE} -- ${@:2}
7474
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Copyright (c) 2024, NVIDIA CORPORATION.
1+
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
22

33
[tool.codespell]
44
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
55
# this is only to allow you to run codespell interactively
6-
skip = "./.git,./build,./python/_skbuild/,.*egg-info.*,./.mypy_cache,./pyproject.toml,./benchmarks/utilities/cxxopts.hpp"
6+
skip = "./.git,./build,./python/_skbuild/,.*egg-info.*,./.mypy_cache,./pyproject.toml,./cpp/benchmarks/utilities/cxxopts.hpp"
77
# ignore short words, and typename parameters like OffsetT
88
ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b"
99
ignore-words-list = "thirdparty,couldn"

python/librmm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ set(BUILD_TESTS OFF)
3535
set(BUILD_BENCHMARKS OFF)
3636
set(CUDA_STATIC_RUNTIME ON)
3737

38-
add_subdirectory(../.. rmm-cpp)
38+
add_subdirectory(../../cpp rmm-cpp)

python/rmm/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
]
6262

6363
# Breathe Configuration
64-
breathe_projects = {"librmm": "../../../doxygen/xml"}
64+
breathe_projects = {"librmm": "../../../cpp/doxygen/xml"}
6565
breathe_default_project = "librmm"
6666

6767
copybutton_prompt_text = ">>> "

0 commit comments

Comments
 (0)