Skip to content

Utage improve align#782

Open
CJ362ff wants to merge 6 commits intoxs-devfrom
utage-improve-align
Open

Utage improve align#782
CJ362ff wants to merge 6 commits intoxs-devfrom
utage-improve-align

Conversation

@CJ362ff
Copy link
Collaborator

@CJ362ff CJ362ff commented Mar 11, 2026

Summary by CodeRabbit

  • Chores
    • Updated branch predictor configuration to improve prediction accuracy and overall simulation performance.
    • Removed a deprecated configuration option and cleaned up minor formatting for clarity.

Cao Jiaming added 2 commits March 10, 2026 17:13
Change-Id: I04dee1db8d1dab65dca9ff775d7128e7cee33ed8
Change-Id: I608fe975cf564882034081f632cbf72ef1d78181
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

Updated MicroTAGE public parameters in the branch predictor: tag bit sizes reduced, history lengths changed, associativity increased, and a base table size parameter removed; small formatting adjustments only.

Changes

Cohort / File(s) Summary
MicroTAGE Parameter Updates
src/cpu/pred/BranchPredictor.py
Changed TTagBitSizes from [16, 16, 16, 16] to [13, 13, 13, 13]; updated histLengths from [5, 9, 17, 27] to [5, 17, 56, 109]; changed numWays from 1 to 2; removed the public baseTableSize parameter; minor formatting/spacing edits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Yakkhini
  • tastynoob

Poem

🐰 I nibble bits and trim the tags,

Histories lengthen, two ways to wag,
A tiny param hopped away,
Predicting hops from night to day,
🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Utage improve align' is vague and does not clearly describe the actual changes made to the codebase. Revise the title to be more descriptive of the specific changes, such as 'Update MicroTAGE branch predictor parameters' to accurately reflect the modifications to TTagBitSizes, histLengths, numWays, and baseTableSize.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch utage-improve-align

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.

@github-actions
Copy link

🚀 Coremark Smoke Test Results

Branch IPC Change
Base (xs-dev) 2.2607 -
This PR 2.2625 📈 +0.0018 (+0.08%)

✅ Difftest smoke test passed!

Cao Jiaming added 2 commits March 11, 2026 13:00
Change-Id: Iefa296f28a6561a7251abc96e96392239d920de1
Change-Id: I6b0fea7c8b29ecef17b761697506a83dbd0de500
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.

🧹 Nitpick comments (1)
src/cpu/pred/BranchPredictor.py (1)

1082-1082: Please cover the new 2-way MicroTAGE path.

Line 1082 now enables way == 1 allocation/update behavior in src/cpu/pred/btb/microtage.cc:518-527. A focused regression or config that forces second-way hits/replacement would make this tuning safer to land.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/cpu/pred/BranchPredictor.py` at line 1082, Branch predictor changes
enable the MicroTAGE two-way path (allocation/update for way == 1) but there's
no focused test exercising it; add a small regression/config that forces
second-way hits and replacements to validate the new path. Create a
unit/regression harness that instantiates the BranchPredictor/MicroTAGE with
numWays=2 (the Param.Unsigned setting in BranchPredictor.py) and run a synthetic
branch stream that causes collisions in the BTB to trigger allocations/updates
on way==1 (the code path in microtage.cc handling way == 1); ensure the test
asserts expected predictions/updates and fails if way==1 never executes so the
two-way behavior is covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/cpu/pred/BranchPredictor.py`:
- Line 1082: Branch predictor changes enable the MicroTAGE two-way path
(allocation/update for way == 1) but there's no focused test exercising it; add
a small regression/config that forces second-way hits and replacements to
validate the new path. Create a unit/regression harness that instantiates the
BranchPredictor/MicroTAGE with numWays=2 (the Param.Unsigned setting in
BranchPredictor.py) and run a synthetic branch stream that causes collisions in
the BTB to trigger allocations/updates on way==1 (the code path in microtage.cc
handling way == 1); ensure the test asserts expected predictions/updates and
fails if way==1 never executes so the two-way behavior is covered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7df1b22-069c-4f7b-982b-64d85e045d02

📥 Commits

Reviewing files that changed from the base of the PR and between 84ec451 and 1198737.

📒 Files selected for processing (1)
  • src/cpu/pred/BranchPredictor.py

@github-actions
Copy link

🚀 Coremark Smoke Test Results

Branch IPC Change
Base (xs-dev) 2.2607 -
This PR 2.2574 📉 -0.0034 (-0.15%)

✅ Difftest smoke test passed!

@github-actions
Copy link

🚀 Coremark Smoke Test Results

Branch IPC Change
Base (xs-dev) 2.2607 -
This PR 2.2692 📈 +0.0084 (+0.37%)

✅ Difftest smoke test passed!

@XiangShanRobot
Copy link

[Generated by GEM5 Performance Robot]
commit: 1198737
workflow: gem5 Align BTB Performance Test(0.3c)

Align BTB Performance

Overall Score

PR Previous Commit Diff(%)
Score 18.26 18.27 -0.02 🔴

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