Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELEASE] cucim v25.02 #827

Merged
merged 17 commits into from
Feb 13, 2025
Merged
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
1 change: 1 addition & 0 deletions .github/copy-pr-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/

enabled: true
auto_sync_draft: false
12 changes: 6 additions & 6 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@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.02
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -38,7 +38,7 @@ jobs:
if: github.ref_type == 'branch'
needs: [python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.02
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand All @@ -51,7 +51,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.02
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -60,15 +60,15 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.02
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.02
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -78,7 +78,7 @@ jobs:
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.02
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ jobs:
- wheel-build
- wheel-tests
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.02
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-25.02
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.02
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.02
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.02
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.02
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -55,14 +55,14 @@ jobs:
wheel-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.02
with:
build_type: pull-request
script: ci/build_wheel.sh
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.02
with:
build_type: pull-request
script: ci/test_wheel.sh
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ on:
jobs:
conda-python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.02
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.02
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/trigger-breaking-change-alert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Trigger Breaking Change Notifications

on:
pull_request_target:
types:
- closed
- reopened
- labeled
- unlabeled

jobs:
trigger-notifier:
if: contains(github.event.pull_request.labels.*.name, 'breaking')
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
sender_login: ${{ github.event.sender.login }}
sender_avatar: ${{ github.event.sender.avatar_url }}
repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
pr_title: "${{ github.event.pull_request.title }}"
pr_body: "${{ github.event.pull_request.body || '_Empty PR description_' }}"
pr_base_ref: ${{ github.event.pull_request.base.ref }}
pr_author: ${{ github.event.pull_request.user.login }}
event_action: ${{ github.event.action }}
pr_merged: ${{ github.event.pull_request.merged }}
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ repos:
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["--severity=warning"]
files: ^ci/
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# cucim 25.02.00 (13 Feb 2025)

## 🐛 Bug Fixes

- Fix primitives benchmark code ([#812](https://github.com/rapidsai/cucim/pull/812)) [@gigony](https://github.com/gigony)
- CuPy 14.0 compatibility ([#808](https://github.com/rapidsai/cucim/pull/808)) [@grlee77](https://github.com/grlee77)

## 🛠️ Improvements

- Use `rapids-pip-retry` in CI jobs that might need retries ([#824](https://github.com/rapidsai/cucim/pull/824)) [@gforsyth](https://github.com/gforsyth)
- Revert CUDA 12.8 shared workflow branch changes ([#818](https://github.com/rapidsai/cucim/pull/818)) [@vyasr](https://github.com/vyasr)
- Build and test with CUDA 12.8.0 ([#815](https://github.com/rapidsai/cucim/pull/815)) [@bdice](https://github.com/bdice)
- Add shellcheck to pre-commit and fix warnings ([#814](https://github.com/rapidsai/cucim/pull/814)) [@gforsyth](https://github.com/gforsyth)
- Update vendored ndimage code with axes support ([#813](https://github.com/rapidsai/cucim/pull/813)) [@grlee77](https://github.com/grlee77)
- Use GCC 13 in CUDA 12 conda builds. ([#811](https://github.com/rapidsai/cucim/pull/811)) [@bdice](https://github.com/bdice)
- Improve performance of color distance calculations by kernel fusion ([#809](https://github.com/rapidsai/cucim/pull/809)) [@grlee77](https://github.com/grlee77)
- Incorporate upstream changes from scikit-image 0.25 ([#806](https://github.com/rapidsai/cucim/pull/806)) [@grlee77](https://github.com/grlee77)
- Update version references in workflow ([#803](https://github.com/rapidsai/cucim/pull/803)) [@AyodeAwe](https://github.com/AyodeAwe)
- Require approval to run CI on draft PRs ([#798](https://github.com/rapidsai/cucim/pull/798)) [@bdice](https://github.com/bdice)
- Add breaking change workflow trigger ([#795](https://github.com/rapidsai/cucim/pull/795)) [@AyodeAwe](https://github.com/AyodeAwe)

# cucim 24.12.00 (11 Dec 2024)

## 🚨 Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.12.00
25.02.00
14 changes: 7 additions & 7 deletions benchmarks/primitives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ static void string_memcpy(benchmark::State& state)
char * c_str = (char*) malloc(size + 1);
memcpy(c_str, data.data(), size);
c_str[size] = '\0';
free(c_str);
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(c_str);
benchmark::DoNotOptimize(size);
free(c_str);
}
}
BENCHMARK(string_memcpy);
Expand All @@ -105,9 +105,9 @@ static void string_strcpy(benchmark::State& state)
std::string data = "#########################################################################################################################################################################################";
char * c_str = (char*) malloc(data.size() + 1);
strcpy(c_str, data.data());
free(c_str);
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(c_str);
free(c_str);
}
}
BENCHMARK(string_strcpy);
Expand All @@ -120,9 +120,9 @@ static void string_strdup(benchmark::State& state)
{
std::string data = "#########################################################################################################################################################################################";
char * c_str = strdup(data.data());
free(c_str);
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(c_str);
free(c_str);
}
}
BENCHMARK(string_strdup);
Expand All @@ -140,12 +140,12 @@ static void alloc_malloc(benchmark::State& state)
arr[i] = (char*)malloc(10);
arr[i][0] = i;
}
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(arr);
for (int i = 0; i < 30000; i++)
{
free(arr[i]);
}
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(arr);
}
}
BENCHMARK(alloc_malloc);//->Iterations(100);
Expand All @@ -163,12 +163,12 @@ static void alloc_pmr(benchmark::State& state)
arr[i] = static_cast<char*>(cucim_malloc(10));
arr[i][0] = i;
}
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(arr);
for (int i = 0; i < 30000; i++)
{
cucim_free(arr[i]);
}
// Make sure the variable is not optimized away by compiler
benchmark::DoNotOptimize(arr);
}
}
BENCHMARK(alloc_pmr);//->Iterations(100);
Expand Down
48 changes: 48 additions & 0 deletions benchmarks/skimage/cucim_color_bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import math
import os
import pickle

Expand All @@ -25,6 +26,10 @@
"lab2xyz",
"rgba2rgb",
"label2rgb",
"deltaE_cie76",
"deltaE_ciede94",
"deltaE_ciede2000",
"deltaE_cmc",
]


Expand All @@ -40,6 +45,32 @@ def set_args(self, dtype):
self.args_gpu = (imaged,)


class DeltaEBench(ImageBench):
def set_args(self, dtype):
from skimage import color, data

# create synthetic lab image pair
rgb1 = data.astronaut()
lab1 = color.rgb2lab(rgb1)
lab2 = color.rgb2lab(np.roll(rgb1, (1, 1), axis=(0, 1)))

# change to desired dtype
lab1 = lab1.astype(dtype, copy=False)
lab2 = lab2.astype(dtype, copy=False)

# tile then crop as needed to get the expected size
n_tile0 = math.ceil(self.shape[0] / lab1.shape[0])
n_tile1 = math.ceil(self.shape[1] / lab1.shape[1])
lab1 = np.tile(lab1, (n_tile0, n_tile1, 1))
lab1 = lab1[: self.shape[0], : self.shape[1], :]
lab2 = np.tile(lab2, (n_tile0, n_tile1, 1))
lab2 = lab2[: self.shape[0], : self.shape[1], :]

print(f"{lab1.shape=}")
self.args_cpu = (lab1, lab2)
self.args_gpu = (cp.asarray(lab1), cp.asarray(lab2))


class RGBABench(ImageBench):
def set_args(self, dtype):
if self.shape[-1] != 4:
Expand Down Expand Up @@ -162,6 +193,23 @@ def main(args):
results = B.run_benchmark(duration=args.duration)
all_results = pd.concat([all_results, results["full"]])

elif function_name.startswith("deltaE"):
# only run these functions for floating point data types
float_dtypes = [t for t in dtypes if np.dtype(t).kind == "f"]

B = DeltaEBench(
function_name=function_name,
shape=shape + (3,),
dtypes=float_dtypes,
fixed_kwargs={},
var_kwargs={},
# index_str=f"{fromspace.lower()}2{tospace.lower()}",
module_cpu=skimage.color,
module_gpu=cucim.skimage.color,
run_cpu=run_cpu,
)
results = B.run_benchmark(duration=args.duration)
all_results = pd.concat([all_results, results["full"]])
elif function_name == "rgba2rgb":
B = RGBABench(
function_name="rgba2rgb",
Expand Down
11 changes: 11 additions & 0 deletions benchmarks/skimage/run-nv-bench-color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ for shape in "${param_shape[@]}"; do
done
done
done

param_shape=(512,512 3840,2160)
param_filt=(deltaE_cie76 deltaE_ciede94 deltaE_ciede2000 deltaE_cmc)
param_dt=(float32, float64)
for shape in "${param_shape[@]}"; do
for filt in "${param_filt[@]}"; do
for dt in "${param_dt[@]}"; do
python cucim_color_bench.py -f $filt -i $shape -d $dt -t 10
done
done
done
3 changes: 2 additions & 1 deletion ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ rapids-mamba-retry install \
"cucim=${RAPIDS_VERSION}" \
"libcucim=${RAPIDS_VERSION}"

export RAPIDS_DOCS_DIR="$(mktemp -d)"
RAPIDS_DOCS_DIR="$(mktemp -d)"
export RAPIDS_DOCS_DIR

rapids-logger "Build Python docs"
pushd docs
Expand Down
7 changes: 4 additions & 3 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source rapids-date-string

rapids-generate-version > ./VERSION

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"

rapids-logger "Generating build requirements"

Expand All @@ -25,7 +25,7 @@ rapids-dependency-file-generator \
| tee /tmp/requirements-build.txt

rapids-logger "Installing build requirements"
python -m pip install \
rapids-pip-retry install \
-v \
--prefer-binary \
-r /tmp/requirements-build.txt
Expand All @@ -42,7 +42,7 @@ cd "${package_dir}"
sccache --zero-stats

rapids-logger "Building '${package_name}' wheel"
python -m pip wheel \
rapids-pip-retry wheel \
-w dist \
-v \
--no-build-isolation \
Expand All @@ -54,6 +54,7 @@ sccache --show-adv-stats

mkdir -p final_dist
python -m auditwheel repair -w final_dist dist/*
# shellcheck disable=SC2010
ls -1 final_dist | grep -vqz 'none'

../../ci/validate_wheel.sh final_dist
Expand Down
Loading
Loading