Skip to content

ci rename#714

Closed
edwu186 wants to merge 2 commits intoxs-devfrom
ci-rename
Closed

ci rename#714
edwu186 wants to merge 2 commits 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: 更新所有脚本路径引用以匹配新文件名
  • 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

Release Notes

  • New Features

    • Added new performance test configurations and benchmark variants for expanded testing coverage
    • New configuration options now available for manual performance testing workflows
  • Chores

    • Updated automated test workflows with refined test configurations
    • Updated continuous integration pipeline setup for improved test execution consistency

✏️ 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
重命名配置文件:
- 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
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

These changes introduce and integrate new gem5 configuration variants (kmhv3_18, kmhv3_22, kmhv3_align) by updating GitHub workflow scripts and adding a new Python configuration file that replaces existing configurations across performance testing and PR validation pipelines.

Changes

Cohort / File(s) Summary
Workflow Configuration Updates
.github/workflows/gem5-ideal-btb-perf-nosc.yml, gem5-ideal-btb-perf-weekly.yml, manual-perf.yml, pr-quick-check.yml
Script path references updated: kmhv3.pykmhv3_align.py, idealkmhv3.pykmhv3_18.py/kmhv3_22.py; new jobs added for spec06/spec17 with BTB variants; manual workflow options reorganized to reflect new config variants.
New Configuration Script
configs/example/kmhv3_22.py
Comprehensive 144-line Python configuration establishing per-core CPU parameters (fetch/decode widths, ROB/register settings), conditional L2 cache (classic or DRRIP-based with banking), L3 MSHR configuration, and system initialization flow via setKmhV3IdealParams().
Utility Shell Scripts
util/xs_scripts/kmh_v3_btb_18.sh, kmh_v3_btb_18_nosc.sh, kmh_v3_btb_22.sh, kmh_v3_btb_align.sh
Script invocations updated to reference new Python configs (kmhv3_18.py, kmhv3_22.py); new kmh_v3_btb_align.sh added with standard pattern for variable validation and gem5 execution.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • util: add weekly CI kmhv3.py configs for spec06 and spec17 #669: Modifies gem5-ideal-btb-perf-weekly.yml workflow with kmhv3-related job and script_path updates, directly overlapping with align/BTB variant configuration changes.
  • Add kmhv3 #609: Introduces initial kmhv3/idealkmhv3 script references and kmh_v3_btb.sh updates that form the baseline for this PR's new variants and renaming scheme.

Suggested reviewers

  • tastynoob
  • CJ362ff

Poem

🐰 Three branches bloom in perf's spring garden,
Align and eighteen, twenty-two embark,
New configs hop through workflows with pardon,
Each script a whisker-twitch in gem5's arc.
Benchmarks align, the DTB runs far! ✨

🚥 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 vague and generic, using non-descriptive language that fails to convey meaningful information about the specific changes being made. Consider revising the title to be more specific about which CI configurations are being renamed and what scripts are involved, such as 'Rename KMHV3 workflow scripts to reflect BTB 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.

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 35-45: The workflow contains duplicate jobs: perf_test_22_spec06
and perf_test_22_spec17 are identical to existing perf_test_spec06 and
perf_test_spec17 (same script_path and benchmark_type), causing redundant CI
runs; either remove the redundant perf_test_22_* jobs or modify them to be
intentionally distinct (e.g., change script_path, add a distinguishing input
like variant: "v22", set a descriptive name/comment, or add env/input
parameters) so their purpose is clear—update the job blocks for
perf_test_22_spec06 and perf_test_22_spec17 accordingly or delete them to
eliminate duplicate execution.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 081db5f and c4e7db0.

📒 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
🪛 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.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)

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)

🔇 Additional comments (12)
util/xs_scripts/kmh_v3_btb_18_nosc.sh (1)

10-10: LGTM!

The update to kmhv3_18.py is consistent with kmh_v3_btb_18.sh, and the --disable-mgsc flag is correctly preserved. Shellcheck warnings are false positives since variables come from common.sh.

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

16-16: LGTM!

The script path update to kmh_v3_btb_18_nosc.sh aligns with the corresponding shell script changes in this PR.

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

38-38: Configuration path updates are correct.

Both the PR branch test (line 38) and base branch test (line 70) now use kmhv3_align.py consistently, which ensures accurate IPC comparison. The configuration file configs/example/kmhv3_align.py exists in the repository.

Also applies to: 70-70

util/xs_scripts/kmh_v3_btb_align.sh (1)

1-10: New script follows established patterns and all referenced resources exist.

The script structure is consistent with other kmh_v3_btb_*.sh scripts. The configs/example/kmhv3_align.py configuration file exists, and the gem5 variable is properly defined in common.sh.

util/xs_scripts/kmh_v3_btb_18.sh (1)

10-10: Verify that kmhv3_18.py exists.

The script path update is correct—configs/example/kmhv3_18.py exists in the repository.

The Shellcheck warnings about gem5 and gem5_home are false positives. Both variables are defined and exported in common.sh (sourced on line 4): gem5_home is set to the repository root directory, and gem5 is set to the GEM5 executable path. Although the validation loop only checks gem5_home, both variables are available when the script executes.

configs/example/kmhv3_22.py (3)

1-21: Star imports are acceptable for gem5 config files.

The star imports flagged by Ruff (F403/F405) are a standard pattern in gem5 configuration scripts. Symbols like KMHV3Scheduler, XSDRRIPRP, LayerBandwidthConfig, Root, xiangshan_system_init, and build_xiangshan_system are provided by these imports. This is consistent with gem5's configuration conventions.


23-121: Configuration function looks well-structured.

The setKmhV3IdealParams function properly configures CPU and cache parameters with clear sectioning. The DRRIP replacement policy calculation (512KB slice with 8-way, 64B line → 1024 sets) at line 106 is consistent with the comment.


123-144: Verify the ordering of argument modifications.

The hardcoded values for args.bp_type and args.l2_size are set after xiangshan_system_init() but before build_xiangshan_system(). Confirm this ordering is correct by checking: (1) whether xiangshan_system_init() also sets these values (safe to override), and (2) whether build_xiangshan_system() depends on these being set during init rather than before the build call.

util/xs_scripts/kmh_v3_btb_22.sh (1)

10-10: LGTM!

The script correctly updates the Python target from idealkmhv3.py to kmhv3_22.py. The Shellcheck warnings about gem5 and gem5_home are false positives—these variables are defined in common.sh which is sourced at line 4.

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

14-21: Script path updates look correct.

The align tests now correctly reference kmh_v3_btb_align.sh.

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

10-15: Configuration options updated correctly.

The new configuration choices (kmhv3_align.py, kmhv3_18.py, kmhv3_22.py) with kmhv3_18.py as the default align with the PR's renaming objective.


55-67: Case mapping and error handling look good.

The configuration-to-script mapping is consistent:

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

The default error case with exit 1 ensures unsupported configurations fail fast.

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

Comment on lines +35 to 45
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 | 🟡 Minor

Duplicate jobs detected: perf_test_22_spec06 and perf_test_22_spec17 are identical to perf_test_spec06 and perf_test_spec17.

Both perf_test_spec06 (lines 23-27) and perf_test_22_spec06 (lines 35-39) use:

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

Similarly, perf_test_spec17 and perf_test_22_spec17 are identical. This will run the same tests twice per workflow execution, wasting CI resources.

If these duplicates are intentional (e.g., for comparing results), please add distinguishing parameters or comments explaining the purpose. Otherwise, consider removing the duplicate jobs.

Proposed fix: Remove duplicate jobs
   perf_test_spec17:
     uses: ./.github/workflows/gem5-perf-template.yml
     with:
       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" 
-  
   # perf_test_spec06_vector:
🤖 Prompt for AI Agents
In @.github/workflows/gem5-ideal-btb-perf-weekly.yml around lines 35 - 45, The
workflow contains duplicate jobs: perf_test_22_spec06 and perf_test_22_spec17
are identical to existing perf_test_spec06 and perf_test_spec17 (same
script_path and benchmark_type), causing redundant CI runs; either remove the
redundant perf_test_22_* jobs or modify them to be intentionally distinct (e.g.,
change script_path, add a distinguishing input like variant: "v22", set a
descriptive name/comment, or add env/input parameters) so their purpose is
clear—update the job blocks for perf_test_22_spec06 and perf_test_22_spec17
accordingly or delete them to eliminate duplicate execution.

@edwu186 edwu186 requested a review from jensen-yan January 15, 2026 07:48
@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