Skip to content

Track peak memory in remaining benchmarks - #24786

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
PointKernel:bench/remaining-peak-memory-10528
Oct 23, 2026
Merged

rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
PointKernel:bench/remaining-peak-memory-10528

Conversation

@PointKernel

@PointKernel PointKernel commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Description

Closes #10528; depends on #24731.

This PR adds peak-memory tracking to the remaining non-join NVBench benchmarks. It also routes device pack, list scatter, and Thrust iterator allocations through the tracked resource, and excludes string replacement and repetition setup from memory tracking.

This also corrects two inherited benchmark inconsistencies: the Thrust iterator reductions now honor the configured RMM resource, and replace with api=multi constructs its target/replacement columns outside the timed callback. These changes alter existing runtime baselines, so lower timings across this PR should not be interpreted as libcudf algorithm speedups. Treat this commit as a baseline change for those cases; the before/after measurements and allocator controls quantify the effect.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Oct 22, 2026
@PointKernel PointKernel added non-breaking Non-breaking change feature request New feature or request labels Oct 22, 2026
@PointKernel

Copy link
Copy Markdown
Member Author

/ok to test

@PointKernel
PointKernel marked this pull request as ready for review October 22, 2026 20:00
@PointKernel
PointKernel requested a review from a team as a code owner October 22, 2026 20:00
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: NVIDIA/cudf
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: dfb7633
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: eb8c3626-0cb2-4c78-8fe1-344683fc2405
📥 Commits

Reviewing files that changed from the base of the PR and between 3429a66 and d4b41f6.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: NVIDIA/cudf
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 35a12aa
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 3198493d-3599-48c6-858e-78868370bcf9
📥 Commits

Reviewing files that changed from the base of the PR and between 35a12aa and 3429a66.

📒 Files selected for processing: 19
  • cpp/benchmarks/ast/transform_fp64.cpp
  • cpp/benchmarks/binaryop/compiled_binaryop.cpp
  • cpp/benchmarks/bitmask/mask_to_bools.cpp
  • cpp/benchmarks/copying/pack.cpp
  • cpp/benchmarks/io/fst.cu
  • cpp/benchmarks/io/parquet/experimental/hybrid_scan/hybrid_scan_metadata.cpp
  • cpp/benchmarks/iterator/iterator.cu
  • cpp/benchmarks/json/json.cu
  • cpp/benchmarks/lists/copying/scatter_lists.cu
  • cpp/benchmarks/string/experimental/stringview_compare.cu
  • cpp/benchmarks/string/make_strings_column.cu
  • cpp/benchmarks/string/repeat_strings.cpp
  • cpp/benchmarks/string/replace.cpp
  • cpp/benchmarks/string/url_decode.cu
  • cpp/benchmarks/transform/is_null.cpp
  • cpp/benchmarks/transform/one_hot_encode.cpp
  • cpp/benchmarks/transform/polynomials_concurrent.cpp
  • cpp/benchmarks/transform/transform_dispatch.cpp
  • cpp/benchmarks/type_dispatcher/type_dispatcher.cu

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Benchmarking
    • Added peak memory usage reporting across a range of benchmarks, making memory consumption visible alongside existing benchmark results.
    • Updated iterator benchmark execution to use a no-sync policy on the default stream.

The pull request adds peak-memory measurements to benchmarks across AST, binary operations, I/O, iterators, strings, and transforms. It also changes memory-resource selection in the pack benchmark and the execution policy used by iterator Thrust reductions.

Changes: Benchmark memory metrics

Layer / File(s) Summary
Peak memory metrics for single-operation benchmarks
cpp/benchmarks/ast/transform_fp64.cpp, cpp/benchmarks/binaryop/compiled_binaryop.cpp, cpp/benchmarks/bitmask/mask_to_bools.cpp, cpp/benchmarks/io/parquet/.../hybrid_scan_metadata.cpp, cpp/benchmarks/json/json.cu, cpp/benchmarks/string/make_strings_column.cu, cpp/benchmarks/string/url_decode.cu, cpp/benchmarks/transform/*, cpp/benchmarks/type_dispatcher/type_dispatcher.cu
These benchmarks create memory statistics loggers and add peak memory usage as an NVBench buffer-size metric.
Peak memory metrics for benchmark variants
cpp/benchmarks/io/fst.cu, cpp/benchmarks/string/experimental/stringview_compare.cu, cpp/benchmarks/string/repeat_strings.cpp, cpp/benchmarks/string/replace.cpp
The FST JSON and string benchmark variants report peak memory usage. The replace multi branch now constructs target and replacement columns before its execution callback.
Memory resources and execution policies
cpp/benchmarks/copying/pack.cpp, cpp/benchmarks/iterator/iterator.cu, cpp/benchmarks/lists/copying/scatter_lists.cu
The pack benchmark selects its output resource using a boolean. Iterator Thrust reductions use RMM’s no-sync execution policy on the default stream. The iterator and scatter benchmarks also report peak memory usage.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Possibly related PRs

  • NVIDIA/cudf#22548: Adds the same peak-memory metric to an earlier set of benchmarks.

Suggested labels: improvement

Suggested reviewers: vyasr, bdice, paul-aiyedun

Merge Risk: ⚪ Minimal · up to 3429a

No identified issue blocks merging the benchmark memory-tracking changes after normal checks.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 34 functions across 19 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check Inconclusive Issue #10528 requires peak_memory_usage for all NVBench benchmarks. This PR adds the logger and metric to the listed remaining non-join benchmarks, including branch-local tracking in replace.cpp a… Provide reviewable evidence that every benchmark covered by #10528 has peak_memory_usage at the reviewed head, or identify the remaining benchmarks that require instrumentation.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title concisely and accurately summarizes the main change: tracking peak memory in the remaining benchmarks.
Out of Scope Changes check Passed The changed resource selection in pack.cpp and scatter_lists.cu, the no-sync Thrust policy in iterator.cu, and the setup exclusions in the string benchmarks directly support accurate peak-memory…
Description check Passed The description directly matches the changeset. It explains peak-memory tracking, tracked allocation resources, and benchmark behavior corrections.
Full details: Out of Scope Changes check

Explanation

The changed resource selection in pack.cpp and scatter_lists.cu, the no-sync Thrust policy in iterator.cu, and the setup exclusions in the string benchmarks directly support accurate peak-memory tracking. The remaining changes add the logger and peak_memory_usage metric to benchmark executions. No unrelated change is shown.

Full details: Linked Issues check

Explanation

Issue #10528 requires peak_memory_usage for all NVBench benchmarks. This PR adds the logger and metric to the listed remaining non-join benchmarks, including branch-local tracking in replace.cpp and repeat_strings.cpp. The diff also routes relevant allocations through the current tracked resource. The supplied evidence does not establish whether all other benchmarks, including join benchmarks, already provide this metric at the reviewed head. Dependency #24731 alone does not establish that code coverage.

Resolution

Provide reviewable evidence that every benchmark covered by #10528 has peak_memory_usage at the reviewed head, or identify the remaining benchmarks that require instrumentation.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mattgara mattgara left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, I just have one concern about this potentially creating a shift in existing benchmarks, it would be good to confirm that it doesn't.

Comment thread cpp/benchmarks/iterator/iterator.cu
@PointKernel
PointKernel requested a review from mattgara October 23, 2026 21:26

@mattgara mattgara left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the PR description.

@PointKernel

Copy link
Copy Markdown
Member Author

/merge

@PointKernel PointKernel reopened this Oct 23, 2026
@rapids-bot
rapids-bot Bot merged commit 6e1c4c6 into NVIDIA:main Oct 23, 2026
78 checks passed
@PointKernel
PointKernel deleted the bench/remaining-peak-memory-10528 branch October 23, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add peak_memory_usage to all nvbench benchmarks

3 participants