Skip to content

util: ci rename#713

Closed
edwu186 wants to merge 1 commit intoxs-devfrom
ci-rename
Closed

util: ci rename#713
edwu186 wants to merge 1 commit intoxs-devfrom
ci-rename

Conversation

@edwu186
Copy link
Copy Markdown
Contributor

@edwu186 edwu186 commented Jan 15, 2026

重命名配置文件:

  • idealkmhv3.py -> kmhv3_18.py
  • kmhv3.py -> kmhv3_align.py

重命名脚本文件:

  • kmh_v3_btb_nosc.sh -> kmh_v3_btb_18_nosc.sh
  • kmh_v3_btb.sh -> kmh_v3_btb_align.sh
  • kmh_v3_ideal.sh -> kmh_v3_btb_22.sh

更新脚本文件中的配置文件路径引用:

  • kmh_v3_btb_align.sh: 更新为使用 kmhv3_align.py
  • kmh_v3_btb_18_nosc.sh: 更新为使用 kmhv3_18.py
  • kmh_v3_btb_22.sh: 使用 kmhv3_22.py

更新 GitHub Actions workflow:

  • gem5-ideal-btb-perf-weekly.yml: 更新所有脚本路径引用以匹配新文件名

Change-Id: Ied453dba5571f51ff2e53cef13789228dc380d00

Summary by CodeRabbit

Release Notes

  • New Features

    • Added new KMHv3_22 benchmark configuration variant with updated system parameters.
    • Added alignment-focused benchmark configurations for performance testing.
  • Chores

    • Updated CI workflow scripts to execute new benchmark variants.
    • Configured additional benchmark jobs for weekly performance testing.

✏️ Tip: You can customize this high-level summary in your review settings.

重命名配置文件:
- idealkmhv3.py -> kmhv3_18.py
- kmhv3.py -> kmhv3_align.py

重命名脚本文件:
- kmh_v3_btb_nosc.sh -> kmh_v3_btb_18_nosc.sh
- kmh_v3_btb.sh -> kmh_v3_btb_align.sh
- kmh_v3_ideal.sh -> kmh_v3_btb_22.sh

更新脚本文件中的配置文件路径引用:
- kmh_v3_btb_align.sh: 更新为使用 kmhv3_align.py
- kmh_v3_btb_18_nosc.sh: 更新为使用 kmhv3_18.py
- kmh_v3_btb_22.sh: 使用 kmhv3_22.py

更新 GitHub Actions workflow:
- gem5-ideal-btb-perf-weekly.yml: 更新所有脚本路径引用以匹配新文件名

Change-Id: Ied453dba5571f51ff2e53cef13789228dc380d00
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

The PR updates gem5 CI workflows to redirect to new KMHv3 variant launcher scripts (btb_18, btb_22, btb_align), introduces a new kmhv3_22.py configuration script for multi-core Xiangshan system setups, and modifies launcher scripts to target updated Python configuration paths.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/gem5-ideal-btb-perf-nosc.yml
Updated perf_test job's script_path from kmh_v3_btb_nosc.sh to kmh_v3_btb_18_nosc.sh
Workflow Configuration
.github/workflows/gem5-ideal-btb-perf-weekly.yml
Redirected existing jobs (align_test_spec06/17, perf_test_spec06/17) to new script variants (kmh_v3_btb_align.sh, kmh_v3_btb_22.sh); added two new jobs perf_test_22_spec06/17 targeting kmh_v3_btb_22.sh with benchmark_type specifications
KMHv3 Configuration Scripts
configs/example/kmhv3_22.py
New configuration script for multi-core Xiangshan system with customizable pipeline widths, renaming, ROB/Load-Store units, predictor settings, and optional cache/L2/L3 configurations
Launcher Scripts
util/xs_scripts/kmh_v3_btb_18.sh
Updated to invoke kmhv3_18.py instead of kmhv3.py
Launcher Scripts
util/xs_scripts/kmh_v3_btb_18_nosc.sh
Updated to invoke kmhv3_18.py instead of idealkmhv3.py
Launcher Scripts
util/xs_scripts/kmh_v3_btb_22.sh
Updated to invoke kmhv3_22.py instead of idealkmhv3.py
Launcher Scripts
util/xs_scripts/kmh_v3_btb_align.sh
New launcher script that sources common.sh, validates environment variables, and executes gem5 with kmhv3_align.py configuration

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • tastynoob
  • CJ362ff

Poem

🐰 Hop, hop! Scripts now point the right way,
New configs dance through gem5's display,
BTB variants bloom in the CI—
Workflows aligned to the sky,
A rabbit's refactor, here to stay! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'util: ci rename' is vague and generic, using non-descriptive terms that don't convey meaningful information about the changeset. Use a more descriptive title that specifies what is being renamed (e.g., 'Rename performance test scripts and configs for v3 benchmark variants').
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@edwu186 edwu186 requested a review from jensen-yan January 15, 2026 03:38
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/gem5-ideal-btb-perf-weekly.yml:
- Around line 23-45: The workflow defines duplicate CI jobs: perf_test_spec06
duplicates perf_test_22_spec06 and perf_test_spec17 duplicates
perf_test_22_spec17, both using script_path ../kmh_v3_btb_22.sh and the same
benchmark_type; update the duplicated jobs to use the intended renamed scripts
or remove the duplicates—locate the job blocks named perf_test_22_spec06 and
perf_test_22_spec17 and either change their script_path to the correct variant
(e.g., kmh_v3_btb_18.sh or the intended renamed script) and/or adjust
benchmark_type as required by the PR, or delete these redundant job entries so
each test runs only once.
🧹 Nitpick comments (1)
configs/example/kmhv3_22.py (1)

135-136: Minor: Redundant setMemClass call.

xiangshan_system_init() already calls Simulation.setMemClass(args) internally (see configs/common/xiangshan.py lines 502-503). This second call on line 136 is harmless but redundant.

♻️ Suggested cleanup
-    # Match the memories with the CPUs, based on the options for the test system
-    TestMemClass = Simulation.setMemClass(args)
-
     test_sys = build_xiangshan_system(args)

Note: TestMemClass is assigned but never used in this script.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0e63fe7 and f9c2702.

📒 Files selected for processing (9)
  • .github/workflows/gem5-ideal-btb-perf-nosc.yml
  • .github/workflows/gem5-ideal-btb-perf-weekly.yml
  • configs/example/kmhv3_18.py
  • configs/example/kmhv3_22.py
  • configs/example/kmhv3_align.py
  • util/xs_scripts/kmh_v3_btb_18.sh
  • util/xs_scripts/kmh_v3_btb_18_nosc.sh
  • util/xs_scripts/kmh_v3_btb_22.sh
  • util/xs_scripts/kmh_v3_btb_align.sh
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-16T08:28:53.334Z
Learnt from: Lingrui98
Repo: OpenXiangShan/GEM5 PR: 649
File: configs/common/xiangshan.py:0-0
Timestamp: 2025-12-16T08:28:53.334Z
Learning: In XiangShan trace mode (configs/common/xiangshan.py), bootloaders are not needed. The correct approach is to set test_sys.workload.bootloader = '' (empty string) to indicate no bootloader, rather than providing a bootloader path.

Applied to files:

  • configs/example/kmhv3_22.py
🧬 Code graph analysis (1)
configs/example/kmhv3_22.py (5)
configs/example/kmhv3_18.py (1)
  • setKmhV3IdealParams (22-120)
src/mem/cache/replacement_policies/ReplacementPolicies.py (1)
  • XSDRRIPRP (158-166)
src/mem/ruby/network/garnet/Router.hh (1)
  • direction (123-123)
configs/common/xiangshan.py (2)
  • xiangshan_system_init (493-510)
  • build_xiangshan_system (198-490)
configs/common/Simulation.py (2)
  • setMemClass (95-98)
  • run_vanilla (774-856)
🪛 Ruff (0.14.11)
configs/example/kmhv3_22.py

7-7: from m5.objects import * used; unable to detect undefined names

(F403)


9-9: from m5.util.fdthelper import * used; unable to detect undefined names

(F403)


15-15: from common.FSConfig import * used; unable to detect undefined names

(F403)


16-16: from common.SysPaths import * used; unable to detect undefined names

(F403)


17-17: from common.Benchmarks import * used; unable to detect undefined names

(F403)


19-19: from common.Caches import * used; unable to detect undefined names

(F403)


20-20: from common.xiangshan import * used; unable to detect undefined names

(F403)


49-49: KMHV3Scheduler may be undefined, or defined from star imports

(F405)


106-106: XSDRRIPRP may be undefined, or defined from star imports

(F405)


115-115: LayerBandwidthConfig may be undefined, or defined from star imports

(F405)


116-116: LayerBandwidthConfig may be undefined, or defined from star imports

(F405)


126-126: xiangshan_system_init may be undefined, or defined from star imports

(F405)


138-138: build_xiangshan_system may be undefined, or defined from star imports

(F405)


142-142: Root may be undefined, or defined from star imports

(F405)

🪛 Shellcheck (0.11.0)
util/xs_scripts/kmh_v3_btb_22.sh

[warning] 10-10: gem5 is referenced but not assigned.

(SC2154)


[warning] 10-10: gem5_home is referenced but not assigned.

(SC2154)

util/xs_scripts/kmh_v3_btb_18_nosc.sh

[warning] 10-10: gem5 is referenced but not assigned.

(SC2154)


[warning] 10-10: gem5_home is referenced but not assigned.

(SC2154)

util/xs_scripts/kmh_v3_btb_18.sh

[warning] 10-10: gem5 is referenced but not assigned.

(SC2154)


[warning] 10-10: gem5_home is referenced but not assigned.

(SC2154)

util/xs_scripts/kmh_v3_btb_align.sh

[warning] 10-10: gem5 is referenced but not assigned.

(SC2154)


[warning] 10-10: gem5_home is referenced but not assigned.

(SC2154)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Quick Build, Unit Tests & Smoke Test
🔇 Additional comments (10)
util/xs_scripts/kmh_v3_btb_18_nosc.sh (1)

10-10: LGTM!

The script correctly references the renamed config file kmhv3_18.py and preserves the --disable-mgsc flag for the "no SC" variant. Shellcheck warnings are false positives as variables are sourced from common.sh.

util/xs_scripts/kmh_v3_btb_18.sh (1)

10-10: LGTM!

The script correctly references the renamed config file kmhv3_18.py. Shellcheck warnings are false positives as the variables are sourced from common.sh.

.github/workflows/gem5-ideal-btb-perf-nosc.yml (1)

16-16: LGTM!

The workflow correctly references the renamed script kmh_v3_btb_18_nosc.sh, aligning with the script rename in util/xs_scripts/.

util/xs_scripts/kmh_v3_btb_22.sh (1)

10-10: Approved. The script correctly references kmhv3_22.py and properly sources common.sh to obtain gem5 and gem5_home variables. The config file exists at configs/example/kmhv3_22.py.

util/xs_scripts/kmh_v3_btb_align.sh (1)

1-10: LGTM - New align script follows established patterns.

The script is well-structured and consistent with the other kmh_v3_btb_*.sh scripts in the directory. References to kmhv3_align.py are correct, and the sourcing of common.sh properly provides the gem5 and gem5_home variables, making any shellcheck warnings about them false positives.

configs/example/kmhv3_22.py (3)

1-21: Imports and path setup look standard for gem5 configurations.

The wildcard imports flagged by static analysis (F403, F405) are typical in gem5 configuration scripts, where symbols like KMHV3Scheduler, XSDRRIPRP, Root, etc. are intentionally imported from m5.objects and common.xiangshan modules. This pattern is consistent with other config files in the codebase (e.g., kmhv3_18.py).


23-121: Configuration function is well-structured and consistent with existing patterns.

The setKmhV3IdealParams function mirrors the implementation in kmhv3_18.py, covering CPU pipeline stages, cache hierarchies, and L2 DRRIP replacement policy configuration. The parameter values and structure are consistent with the project's KMHv3 configuration conventions.


138-144: Main execution flow looks correct.

The sequence of building the system, applying ideal parameters with highest priority, creating the root, and running the vanilla simulation follows established gem5 configuration patterns.

.github/workflows/gem5-ideal-btb-perf-weekly.yml (2)

11-21: Align test jobs updated correctly.

The script path updates to ../kmh_v3_btb_align.sh for both SPEC06 and SPEC17 align tests are consistent with the PR's renaming objectives.


47-53: Commented section updated for consistency.

The commented-out perf_test_spec06_vector job has been updated to reference the new script path, maintaining consistency if this job is re-enabled later.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines 23 to 45
perf_test_spec06:
uses: ./.github/workflows/gem5-perf-template.yml
with:
script_path: ../kmh_v3_ideal.sh
script_path: ../kmh_v3_btb_22.sh
benchmark_type: "spec06-1.0c"

perf_test_spec17:
uses: ./.github/workflows/gem5-perf-template.yml
with:
script_path: ../kmh_v3_ideal.sh
script_path: ../kmh_v3_btb_22.sh
benchmark_type: "spec17-1.0c"

perf_test_22_spec06:
uses: ./.github/workflows/gem5-perf-template.yml
with:
script_path: ../kmh_v3_btb_22.sh
benchmark_type: "spec06-1.0c"

perf_test_22_spec17:
uses: ./.github/workflows/gem5-perf-template.yml
with:
script_path: ../kmh_v3_btb_22.sh
benchmark_type: "spec17-1.0c"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Duplicate job configurations detected.

perf_test_spec06 (lines 23-27) and perf_test_22_spec06 (lines 35-39) have identical configurations:

  • Both use script_path: ../kmh_v3_btb_22.sh
  • Both use benchmark_type: "spec06-1.0c"

Similarly, perf_test_spec17 (lines 29-33) and perf_test_22_spec17 (lines 41-45) are identical.

This appears to be unintentional duplication that will run the same tests twice, wasting CI resources. Based on the PR objectives mentioning renames, should one of these pairs use a different script (e.g., kmh_v3_btb_18.sh or another variant)?

🤖 Prompt for AI Agents
In @.github/workflows/gem5-ideal-btb-perf-weekly.yml around lines 23 - 45, The
workflow defines duplicate CI jobs: perf_test_spec06 duplicates
perf_test_22_spec06 and perf_test_spec17 duplicates perf_test_22_spec17, both
using script_path ../kmh_v3_btb_22.sh and the same benchmark_type; update the
duplicated jobs to use the intended renamed scripts or remove the
duplicates—locate the job blocks named perf_test_22_spec06 and
perf_test_22_spec17 and either change their script_path to the correct variant
(e.g., kmh_v3_btb_18.sh or the intended renamed script) and/or adjust
benchmark_type as required by the PR, or delete these redundant job entries so
each test runs only once.

@edwu186 edwu186 closed this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant