Skip to content

Benchmarks: Support compact core ranges in CPU STREAM - #894

Open
pdr (dpower4) wants to merge 3 commits into
mainfrom
dev/fix_stream_config
Open

pdr (dpower4) wants to merge 3 commits into
mainfrom
dev/fix_stream_config

Conversation

@dpower4

Copy link
Copy Markdown
Contributor

Description
Add compact start,end,step core 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,1 selects cores 88 through 151 (64 threads).
  • cores: 88,151,2 selects cores 88, 90, ..., 150 (32 threads).
  • cores: 88 90 92 continues to work as before.

The end is inclusive when reached by the step. The same compact syntax is supported through --cores on the command line.

Major Revision

  • Parse explicit core lists and compact ranges into the same flat integer list, preserving OpenMP placement and thread-count generation.
  • Validate that compact ranges have exactly three integers, nonnegative core IDs, ordered bounds, and a positive step. Reject malformed or mixed list/range input with argument errors.

Minor Revision

  • Add regression coverage for inclusive and stepped ranges, single-core selections, invalid arguments, legacy lists, and unchanged defaults.
  • Document the range syntax, examples, and validation rules in the CPU STREAM user guide.

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.
  • YAML-to-executor-to-STREAM argument parsing — passed for both compact examples and the legacy list format.
  • Pylance syntax checks — passed for both changed Python 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.

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]>
@dpower4
pdr (dpower4) requested a review from a team as a code owner November 4, 2026 20:23
Copilot AI balanced review requested due to automatic review settings November 4, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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,step ranges 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

@dpower4 pdr (dpower4) added the micro-benchmarks Micro Benchmark Test for SuperBench Benchmarks label Nov 4, 2026
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.38%. Comparing base (347d02a) to head (f68a1c1).

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              
Flag Coverage Δ
cpu-python3.10-unit-test 71.99% <100.00%> (+0.04%) ⬆️
cpu-python3.12-unit-test 71.99% <100.00%> (+0.04%) ⬆️
cpu-python3.7-unit-test 71.45% <100.00%> (+0.04%) ⬆️
cuda-unit-test 84.39% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the compact CPU STREAM core-selection change.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 13, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the compact CPU core-range selection change.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

micro-benchmarks Micro Benchmark Test for SuperBench Benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants