Repository navigation
Benchmarks: Support compact core ranges in CPU STREAM - #894
Open
pdr (dpower4) wants to merge 3 commits into
Open
pdr (dpower4) wants to merge 3 commits into
pdr (dpower4) wants to merge 3 commits into
Conversation
Accept --cores start,end,step with an inclusive end while preserving explicit space-separated core lists and the existing defaults. Validate range bounds and positive steps before generating OpenMP placement and thread counts. Add regression tests for range expansion, invalid inputs, legacy lists, and defaults, and document YAML and CLI usage. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues with the compact CPU core-range selection change.
No open issues 🎉
What changed in this PR
Adds compact core-range selection to CPU STREAM, simplifying YAML and command-line configuration while preserving explicit core lists and defaults.
Changes:
- Accepts
start,end,stepranges and converts them into the existing flat core list. - Validates range bounds and steps, rejecting malformed or mixed input.
- Adds regression tests and documents syntax, examples, and validation rules.
| File | Description |
|---|---|
tests/benchmarks/micro_benchmarks/test_cpu_stream_performance.py |
Tests ranges, legacy lists, defaults, invalid input, and command generation. |
superbench/benchmarks/micro_benchmarks/cpu_stream_performance.py |
Adds range parsing and validation to --cores. |
docs/user-tutorial/benchmarks/micro-benchmarks.md |
Documents compact core selection for YAML and command-line use. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #894 +/- ##
==========================================
+ Coverage 86.36% 86.38% +0.02%
==========================================
Files 107 107
Lines 8258 8271 +13
==========================================
+ Hits 7132 7145 +13
Misses 1126 1126
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
WenqingLan1
approved these changes
Nov 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add compact
start,end,stepcore selection to CPU STREAM so YAML configurations do not need long, space-separated lists of consecutive cores. The existing list format and default core configuration remain unchanged.For example:
cores: 88,151,1selects cores 88 through 151 (64 threads).cores: 88,151,2selects cores 88, 90, ..., 150 (32 threads).cores: 88 90 92continues to work as before.The end is inclusive when reached by the step. The same compact syntax is supported through
--coreson the command line.Major Revision
Minor Revision
Validation
Validated in an isolated Python 3.13 environment:
python -m pytest -q tests/benchmarks/micro_benchmarks/test_cpu_stream_performance.py— passed, 7 tests.python -m flake8 superbench/benchmarks/micro_benchmarks/cpu_stream_performance.py tests/benchmarks/micro_benchmarks/test_cpu_stream_performance.py— passed.python -m mypy --follow-imports=silent superbench/benchmarks/micro_benchmarks/cpu_stream_performance.py tests/benchmarks/micro_benchmarks/test_cpu_stream_performance.py— passed, no issues in 2 files.The full test suite and a hardware STREAM benchmark run were not performed; the focused tests validate argument parsing, command generation, and existing result parsing.