Skip to content

Commit bed9393

Browse files
committed
Merge branch 'main' of github.com:rapidsai/cumlprims_mg into fea/use-sccache-build-cluster
2 parents f5dd62f + ab76bf9 commit bed9393

File tree

3 files changed

+81
-6
lines changed

3 files changed

+81
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ $ make install
9393

9494
4. Tests are optional currently, and can currently be run with CUDA aware MPI installed only. They are meant for development mainly currently (will be enabled in CI in the future). To test full end-to-end functionality of the `libcumlprims` package, the pytests of main cuML need to be run.
9595

96-
To do that, first build (and install) `libcumlprims`, and then refer to [cuML's build guide](https://github.com/rapidsai/cuml/blob/branch-0.14/BUILD.md). After building `libcuml++` and the python package `cuml`, the pytests under `python/cuml/test/dask` will run unit tests of the algorithms that use `libcumlprims`.
96+
To do that, first build (and install) `libcumlprims`, and then refer to [cuML's build guide](https://github.com/rapidsai/cuml/blob/main/BUILD.md). After building `libcuml++` and the python package `cuml`, the pytests under `python/cuml/test/dask` will run unit tests of the algorithms that use `libcumlprims`.
9797

9898
### Code Style
9999

ci/release/update-version.sh

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,66 @@
66
########################
77

88
## Usage
9-
# bash update-version.sh <new_version>
9+
# Primary interface: ./ci/release/update-version.sh --run-context=main|release <new_version>
10+
# Fallback: Environment variable support for automation needs
11+
# NOTE: Must be run from the root of the repository
12+
#
13+
# CLI args take precedence when both are provided
14+
# If neither RUN_CONTEXT nor --run-context is provided, defaults to main
15+
#
16+
# Examples:
17+
# ./ci/release/update-version.sh --run-context=main 25.12.00
18+
# ./ci/release/update-version.sh --run-context=release 25.12.00
19+
# RAPIDS_RUN_CONTEXT=main ./ci/release/update-version.sh 25.12.00
1020

21+
# Verify we're running from the repository root
22+
if [[ ! -f "VERSION" ]] || [[ ! -f "ci/release/update-version.sh" ]] || [[ ! -d "cpp" ]]; then
23+
echo "Error: This script must be run from the root of the cumlprims_mg repository"
24+
echo ""
25+
echo "Usage:"
26+
echo " cd /path/to/cumlprims_mg"
27+
echo " ./ci/release/update-version.sh --run-context=main|release <new_version>"
28+
echo ""
29+
echo "Example:"
30+
echo " ./ci/release/update-version.sh --run-context=main 25.12.00"
31+
exit 1
32+
fi
33+
34+
# Parse command line arguments
35+
POSITIONAL_ARGS=()
36+
while [[ $# -gt 0 ]]; do
37+
case $1 in
38+
--run-context=*)
39+
CLI_RUN_CONTEXT="${1#*=}"
40+
shift
41+
;;
42+
*)
43+
POSITIONAL_ARGS+=("$1")
44+
shift
45+
;;
46+
esac
47+
done
48+
49+
# Restore positional parameters
50+
set -- "${POSITIONAL_ARGS[@]}"
51+
52+
# Determine RUN_CONTEXT with precedence: CLI > Environment > Default
53+
if [[ -n "${CLI_RUN_CONTEXT:-}" ]]; then
54+
RUN_CONTEXT="${CLI_RUN_CONTEXT}"
55+
echo "Using run-context from CLI: ${RUN_CONTEXT}"
56+
elif [[ -n "${RAPIDS_RUN_CONTEXT:-}" ]]; then
57+
RUN_CONTEXT="${RAPIDS_RUN_CONTEXT}"
58+
echo "Using RUN_CONTEXT from environment: ${RUN_CONTEXT}"
59+
else
60+
RUN_CONTEXT="main"
61+
echo "Using default run-context: ${RUN_CONTEXT}"
62+
fi
63+
64+
# Validate RUN_CONTEXT
65+
if [[ "${RUN_CONTEXT}" != "main" && "${RUN_CONTEXT}" != "release" ]]; then
66+
echo "Error: Invalid run-context '${RUN_CONTEXT}'. Must be 'main' or 'release'"
67+
exit 1
68+
fi
1169

1270
# Format is YY.MM.PP - no leading 'v' or trailing 'a'
1371
NEXT_FULL_TAG=$1
@@ -27,7 +85,14 @@ NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
2785
# Need to distutils-normalize the original version
2886
NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_SHORT_TAG}'))")
2987

30-
echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"
88+
# Determine branch name based on context
89+
if [[ "${RUN_CONTEXT}" == "main" ]]; then
90+
RAPIDS_BRANCH_NAME="main"
91+
echo "Preparing development branch update ${CURRENT_TAG} => ${NEXT_FULL_TAG} (targeting main branch)"
92+
elif [[ "${RUN_CONTEXT}" == "release" ]]; then
93+
RAPIDS_BRANCH_NAME="release/${NEXT_SHORT_TAG}"
94+
echo "Preparing release branch update ${CURRENT_TAG} => ${NEXT_FULL_TAG} (targeting release/${NEXT_SHORT_TAG} branch)"
95+
fi
3196

3297
# Inplace sed replace; workaround for Linux and Mac
3398
function sed_runner() {
@@ -36,7 +101,7 @@ function sed_runner() {
36101

37102
# Centralized version file update
38103
echo "${NEXT_FULL_TAG}" > VERSION
39-
echo "branch-${NEXT_SHORT_TAG}" > RAPIDS_BRANCH
104+
echo "${RAPIDS_BRANCH_NAME}" > RAPIDS_BRANCH
40105

41106
DEPENDENCIES=(
42107
libraft-headers
@@ -48,10 +113,20 @@ for DEP in "${DEPENDENCIES[@]}"; do
48113
done
49114
done
50115

116+
# CI files - context-aware branch references
51117
for FILE in .github/workflows/*.yaml; do
52-
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
118+
sed_runner "/shared-workflows/ s|@.*|@${RAPIDS_BRANCH_NAME}|g" "${FILE}"
53119
done
54120

121+
# Documentation references - context-aware
122+
if [[ "${RUN_CONTEXT}" == "main" ]]; then
123+
# In main context, keep documentation on main (no changes needed)
124+
:
125+
elif [[ "${RUN_CONTEXT}" == "release" ]]; then
126+
# In release context, use release branch for documentation links (word boundaries to avoid partial matches)
127+
sed_runner "s|\\bmain\\b|release/${NEXT_SHORT_TAG}|g" README.md
128+
fi
129+
55130
# .devcontainer files
56131
find .devcontainer/ -type f -name devcontainer.json -print0 | while IFS= read -r -d '' filename; do
57132
sed_runner "s@rapidsai/devcontainers:[0-9.]*@rapidsai/devcontainers:${NEXT_SHORT_TAG}@g" "${filename}"

cpp/src_prims_opg/matrix/matrix_utils.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <cumlprims/opg/matrix/matrix_utils.hpp>
88
#include <raft/linalg/transpose.cuh>
99
#include <rmm/device_uvector.hpp>
10-
#include <rmm/mr/device/per_device_resource.hpp>
10+
#include <rmm/mr/per_device_resource.hpp>
1111

1212
namespace MLCommon {
1313
namespace Matrix {

0 commit comments

Comments
 (0)