Skip to content

Ci rename#717

Open
edwu186 wants to merge 5 commits intoxs-devfrom
ci-rename
Open

Ci rename#717
edwu186 wants to merge 5 commits intoxs-devfrom
ci-rename

Conversation

@edwu186
Copy link
Collaborator

@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: 更新所有脚本路径引用以匹配新文件名
manual-perf.yml: 更新配置选项和脚本路径映射,支持新的配置文件命名
移除旧选项 idealkmhv3.py 和 kmhv3.py
新增选项 kmhv3_align.py、kmhv3_18.py、kmhv3_22.py
更新默认配置为 kmhv3_18.py
pr-quick-check.yml: 更新配置文件路径引用 (kmhv3.py -> kmhv3_align.py)

Summary by CodeRabbit

  • Chores

    • Updated CI workflows to use revised performance test configurations and deprecated older variants.
    • Changed default manual performance configuration and refreshed available configuration options.
  • New Features

    • Added a new example system configuration for an updated target variant.
    • Added a helper script to run aligned performance runs with input validation.
  • Tests

    • Added new perf test jobs covering the new configuration variant and alignment scenarios.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

Replaces previous kmhv3/idealkmhv3 references with three variants (kmhv3_align, kmhv3_18, kmhv3_22); updates CI workflow job script_path entries; adds util/xs_scripts/kmh_v3_btb_align.sh; and introduces a new example config configs/example/kmhv3_22.py.

Changes

Cohort / File(s) Summary
Workflow updates
.github/workflows/gem5-ideal-btb-perf-nosc.yml, .github/workflows/gem5-ideal-btb-perf-weekly.yml, .github/workflows/manual-perf.yml, .github/workflows/pr-quick-check.yml
Swapped script/config mappings: replace references to kmhv3.py / idealkmhv3.py with kmhv3_align.py, kmhv3_18.py, and kmhv3_22.py; added/adjusted perf_test variants and commented examples in weekly workflow; updated manual/perf parameter resolution.
New example config
configs/example/kmhv3_22.py
Added KMHV3 example configuration with detailed CPU, cache (L2/L3), predictor, LSU/LSQ parameterization and a main entrypoint for gem5 runs.
Example config (18)
configs/example/kmhv3_18.py
Added/expanded setKmhV3IdealParams to configure per-core and system-wide KMHV3 parameters and main simulation flow.
Utility scripts (invoke configs)
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
Updated scripts to invoke configs/example/kmhv3_18.py or kmhv3_22.py instead of older example(s); preserved CLI argument usage.
New utility script
util/xs_scripts/kmh_v3_btb_align.sh
Added script that sources common.sh, validates required env vars (GCBV_REF_SO, GCB_RESTORER, gem5_home), and runs configs/example/kmhv3_align.py with --generic-rv-cpt.
Minor/no-op
configs/example/kmhv3_align.py
No functional changes beyond newline/EOF normalization.

Sequence Diagram(s)

(omitted — changes are configuration/script swaps and new config/script additions; no new multi-component control flow requiring visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

perf

Suggested reviewers

  • tastynoob
  • CJ362ff

Poem

🐇 I hop from script to script with glee,
New configs: align, 18, and 22 for me,
Workflows updated, shells check the stage,
Benchmarks lined up to run the page,
A carrot cheers the CI spree!

🚥 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 'Ci rename' is too vague and generic. While it relates to CI configuration changes, it does not convey meaningful details about what was renamed or why. Use a more descriptive title like 'Rename CI config files and update workflow references' to clearly communicate the scope and nature of changes.
✅ 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.

Copy link

@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 `@configs/example/kmhv3_22.py`:
- Around line 130-133: The comment above the assignments to args.bp_type and
args.l2_size is misleading because the code unconditionally overwrites those
values; either update the comment to state these are intentional forced settings
for the "ideal_kmhv3" config, or change the code to only set defaults when not
provided (e.g., check if args.bp_type is falsy before assigning). Specifically,
modify the comment to reflect unconditional assignment for the ideal config or
wrap the assignments to args.bp_type and args.l2_size in a conditional that
respects existing user-provided values (and reference the ideal_kmhv3 flag in
the comment if needed).
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af41044 and 13c100a.

📒 Files selected for processing (11)
  • .github/workflows/gem5-ideal-btb-perf-nosc.yml
  • .github/workflows/gem5-ideal-btb-perf-weekly.yml
  • .github/workflows/manual-perf.yml
  • .github/workflows/pr-quick-check.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 (4)
configs/example/kmhv3_18.py (1)
  • setKmhV3IdealParams (22-120)
configs/common/FUScheduler.py (1)
  • KMHV3Scheduler (187-293)
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_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_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.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)

🔇 Additional comments (14)
util/xs_scripts/kmh_v3_btb_18.sh (1)

10-10: LGTM!

The config path update to kmhv3_18.py is consistent with the PR's renaming scheme. The shellcheck warnings about $gem5 and $gem5_home are false positives since these variables are sourced from common.sh on line 4.

util/xs_scripts/kmh_v3_btb_18_nosc.sh (1)

10-10: LGTM!

The config path update to kmhv3_18.py is consistent with the PR's renaming scheme while preserving the --disable-mgsc flag. The shellcheck warnings are false positives as variables are sourced from common.sh.

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

16-16: LGTM!

The script path update correctly references the renamed kmh_v3_btb_18_nosc.sh script, maintaining consistency with the shell script renaming in this PR.

util/xs_scripts/kmh_v3_btb_align.sh (1)

1-10: LGTM!

The new script follows the same established pattern as other scripts in the xs_scripts family, correctly sourcing common.sh and validating required variables before invoking the kmhv3_align.py configuration. The shellcheck warnings are false positives as the variables are sourced from common.sh.

configs/example/kmhv3_22.py (2)

7-20: Star imports are conventional for gem5 configs.

While Ruff flags these star imports (F403/F405), this pattern is consistent with other gem5 configuration files including kmhv3_18.py. The symbols like KMHV3Scheduler, XSDRRIPRP, LayerBandwidthConfig, Root, etc. are all provided by these imports as expected.


23-121: LGTM!

The setKmhV3IdealParams function follows the same structure as kmhv3_18.py with well-organized parameter groupings for each CPU component (fetch, decode, rename, dispatch, scheduler, ROB, LSU, LSQ, caches). The L2 cache configuration properly handles both classic and non-classic modes with appropriate DRRIP replacement policy settings.

util/xs_scripts/kmh_v3_btb_22.sh (1)

10-10: Config path update looks correct.

The change from idealkmhv3.py to kmhv3_22.py aligns with the PR's renaming objectives.

.github/workflows/pr-quick-check.yml (2)

38-38: Config path update is consistent.

The change from kmhv3.py to kmhv3_align.py is correctly applied to the Difftest smoke test step.


70-70: Base branch test uses matching config.

The same kmhv3_align.py config is correctly used for the base branch comparison, ensuring consistent IPC measurements between branches.

.github/workflows/manual-perf.yml (2)

10-15: Configuration options correctly updated.

The default and options are properly updated to reflect the new naming scheme:

  • Default changed to kmhv3_18.py
  • Old options (idealkmhv3.py, kmhv3.py) removed
  • New options (kmhv3_align.py, kmhv3_18.py, kmhv3_22.py) added

55-63: Script mappings are correct and all referenced scripts exist.

Each configuration correctly maps to its corresponding script:

  • kmhv3_align.pykmh_v3_btb_align.sh
  • kmhv3_18.pykmh_v3_btb_18.sh
  • kmhv3_22.pykmh_v3_btb_22.sh

All scripts are present at ./util/xs_scripts/.

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

14-21: Align test script paths updated correctly.

Both align_test_spec06 and align_test_spec17 now reference kmh_v3_btb_align.sh, matching the renamed script.


26-33: Perf test script paths updated correctly.

Both perf_test_spec06 and perf_test_spec17 now use kmh_v3_btb_18.sh, aligning with the rename from kmh_v3_ideal.sh.


35-45: New perf_test_22 jobs extend test coverage.

The addition of perf_test_22_spec06 and perf_test_22_spec17 jobs using kmh_v3_btb_22.sh extends the weekly performance test coverage to include the new KMHV3 22 configuration variant.

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

Comment on lines 130 to 133
# Set default bp_type based on ideal_kmhv3 flag
# If user didn't specify bp_type, set default based on ideal_kmhv3
args.bp_type = 'DecoupledBPUWithBTB'
args.l2_size = '2MB'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Misleading comment: values are set unconditionally.

The comment states "If user didn't specify bp_type, set default based on ideal_kmhv3" but the code unconditionally overwrites bp_type and l2_size regardless of user input. If this is intentional for the "ideal" config, consider updating the comment to reflect that:

📝 Suggested comment fix
-    # Set default bp_type based on ideal_kmhv3 flag
-    # If user didn't specify bp_type, set default based on ideal_kmhv3
+    # Force ideal bp_type and l2_size (overrides command-line arguments)
     args.bp_type = 'DecoupledBPUWithBTB'
     args.l2_size = '2MB'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Set default bp_type based on ideal_kmhv3 flag
# If user didn't specify bp_type, set default based on ideal_kmhv3
args.bp_type = 'DecoupledBPUWithBTB'
args.l2_size = '2MB'
# Force ideal bp_type and l2_size (overrides command-line arguments)
args.bp_type = 'DecoupledBPUWithBTB'
args.l2_size = '2MB'
🤖 Prompt for AI Agents
In `@configs/example/kmhv3_22.py` around lines 130 - 133, The comment above the
assignments to args.bp_type and args.l2_size is misleading because the code
unconditionally overwrites those values; either update the comment to state
these are intentional forced settings for the "ideal_kmhv3" config, or change
the code to only set defaults when not provided (e.g., check if args.bp_type is
falsy before assigning). Specifically, modify the comment to reflect
unconditional assignment for the ideal config or wrap the assignments to
args.bp_type and args.l2_size in a conditional that respects existing
user-provided values (and reference the ideal_kmhv3 flag in the comment if
needed).

@jensen-yan
Copy link
Collaborator

#610
建议可以修复下这个PR, 然后就可以不用kmh_v3_btb_align.sh 这些bash 脚本了,
减少一层理解,可能更简单,
kmh_v3_btb_nosc.sh 也可以删除了
不过现在这样也可以

Copy link

@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 35-45: Remove the trailing whitespace after the closing quote in
the benchmark_type value for the perf_test_22_spec17 job (the string
"spec17-1.0c") so the YAML line ends cleanly; locate the perf_test_22_spec17
block (and perf_test_22_spec06 for comparison) and delete the extra space
character after the closing quote to ensure no trailing whitespace remains.
🧹 Nitpick comments (1)
.github/workflows/gem5-ideal-btb-perf-weekly.yml (1)

23-33: Consider cleaning up or removing disabled job blocks.

The commented-out perf_test_spec06 and perf_test_spec17 blocks use an unusual YAML comment style where the # is placed at the content's indentation level rather than at the line start. While functional, this can make future maintenance harder.

If these jobs are intentionally disabled (per the commit message about disabling 18config weekly regression), consider either:

  1. Removing the blocks entirely if they won't be re-enabled soon.
  2. Using a consistent comment style with # at the start of each line.
♻️ Suggested cleanup (if keeping commented blocks)
-  # perf_test_spec06:
-    # uses: ./.github/workflows/gem5-perf-template.yml
-    # with:
-      # script_path: ../kmh_v3_btb_18.sh
-      # benchmark_type: "spec06-1.0c"
-  # 
-  # perf_test_spec17:
-    # uses: ./.github/workflows/gem5-perf-template.yml
-    # with:
-      # script_path: ../kmh_v3_btb_18.sh
-      # benchmark_type: "spec17-1.0c" 
+  # perf_test_spec06:
+  #   uses: ./.github/workflows/gem5-perf-template.yml
+  #   with:
+  #     script_path: ../kmh_v3_btb_18.sh
+  #     benchmark_type: "spec06-1.0c"
+  #
+  # perf_test_spec17:
+  #   uses: ./.github/workflows/gem5-perf-template.yml
+  #   with:
+  #     script_path: ../kmh_v3_btb_18.sh
+  #     benchmark_type: "spec17-1.0c"

jensen-yan
jensen-yan previously approved these changes Jan 19, 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
重命名配置文件:
- 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: 更新所有脚本路径引用以匹配新文件名
- manual-perf.yml: 更新配置选项和脚本路径映射,支持新的配置文件命名
  * 移除旧选项 idealkmhv3.py 和 kmhv3.py
  * 新增选项 kmhv3_align.py、kmhv3_18.py、kmhv3_22.py
  * 更新默认配置为 kmhv3_18.py
- pr-quick-check.yml: 更新配置文件路径引用 (kmhv3.py -> kmhv3_align.py)

Change-Id: Ied453dba5571f51ff2e53cef13789228dc380d00
Change-Id: If90afc89aecc3353db47e1e9067d45d81eb9c870
Change-Id: Ic35df437ada363cafb71263e566a65b5c12ae14e
Change-Id: I4694b325c8401d8d703ef1c53a98e3609358bd60
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.

2 participants