Skip to content

Remove unnecessary benchmark resource swap - #2398

Merged
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
bdice:pr-remove-benchmark-resource-swap
May 22, 2026
Merged

rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
bdice:pr-remove-benchmark-resource-swap

Conversation

@bdice

@bdice bdice commented May 17, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Removes the global current-device resource swap from the multi-stream allocation benchmark. The benchmark already passes the intended memory resource explicitly to allocations, so changing the global resource is unnecessary.

Checklist

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

@bdice bdice added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels May 17, 2026
@copy-pr-bot

copy-pr-bot Bot commented May 17, 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.

@coderabbitai

coderabbitai Bot commented May 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR removes global state management from the BM_MultiStreamAllocations benchmark. Two lines that set the global current device memory resource before benchmark execution and two lines that reset it afterward are deleted, leaving the core benchmark flow—stream pool construction, kernel launches, and measurements—unchanged.

Changes

Global state cleanup

Layer / File(s) Summary
Remove global state set/reset calls
cpp/benchmarks/multi_stream_allocations/multi_stream_allocations_bench.cu
The benchmark no longer sets the global current device memory resource to the selected mr at the start (lines 66–67) or resets the prior state at the end (lines 80–81), removing RMM global state side effects from the benchmark.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • miscco
  • shrshi
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove unnecessary benchmark resource swap' directly and accurately describes the main change: removing unnecessary global resource state management from the benchmark.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly explains the removal of unnecessary global resource swap from the multi-stream allocation benchmark, which directly relates to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@bdice bdice mentioned this pull request May 17, 2026
51 tasks done
@bdice bdice moved this to In Progress in RMM Project Board May 21, 2026
@bdice bdice self-assigned this May 21, 2026
@bdice
bdice marked this pull request as ready for review May 21, 2026 21:55
@bdice
bdice requested a review from a team as a code owner May 21, 2026 21:55
@bdice
bdice requested review from shrshi and wence- May 21, 2026 21:55
@bdice

bdice commented May 22, 2026

Copy link
Copy Markdown
Collaborator Author

/merge

@rapids-bot
rapids-bot Bot merged commit 75f568e into rapidsai:main May 22, 2026
79 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in RMM Project Board May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants