Skip to content

feat(ubtb): remove takenCnt & valid field - #5157

Merged
rich-cake merged 1 commit into
kunminghu-v3from
feat-ubtb-remove-takencnt
Nov 3, 2025
Merged

rich-cake merged 1 commit into
kunminghu-v3from
feat-ubtb-remove-takencnt

Conversation

@ngc7331

@ngc7331 ngc7331 commented Oct 30, 2025 •

Copy link
Copy Markdown
Member

We only train taken branches into ubtb, if it's not taken, it's not useful. So usefulCnt is some sort of takenCnt. Therefore, we can remove takenCnt and do an always-taken prediction in ubtb.

This also allows non-taken branches to be evicted earlier and thus we can use abtb/fallthrough results, so maybe has some performance gain.

We can also remove valid as it should always be usefulCnt != 0

@ngc7331 ngc7331 added this to the kmh-v3 milestone Oct 30, 2025
@ngc7331 ngc7331 added topic: area To reduce area comsuption note: testing (PR) For maintainer: this is for CI test, do not merge module: frontend Bpu, Ftq, Ifu, ICache, IBuffer topic: performance To improve performance labels Oct 30, 2025
@ngc7331
ngc7331 force-pushed the feat-ubtb-remove-takencnt branch 2 times, most recently from 86dddb7 to 56ae437 Compare October 31, 2025 07:29
@ngc7331 ngc7331 changed the title feat(ubtb): remove takenCnt feat(ubtb): remove takenCnt & valid field Nov 1, 2025
@ngc7331 ngc7331 removed the note: testing (PR) For maintainer: this is for CI test, do not merge label Nov 1, 2025
@ngc7331
ngc7331 marked this pull request as ready for review November 1, 2025 06:31
@ngc7331

ngc7331 commented Nov 1, 2025

Copy link
Copy Markdown
Member Author

CI IPC has increased both with/without fastTrain (#5145)

IPC report w/o #5145

Run # Branch Commit PR Updated astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk Avg. Diff
18934432033 (base) kunminghu-v3 82957fb unknown 2025-10-31T10:48:11Z 0.762649 0.439234 1.004732 0.65648 3.003717 1.62862 2.529884 1.110032 0.713159 0.731378 1.419134 2.182647 1.180872 1.894855 0.839904
18965831697 feat-ubtb-remove-takencnt 56ae437 #5157 2025-11-01T06:31:30Z 0.777731 0.438955 1.007372 0.658527 3.002407 1.626572 2.529884 1.104146 0.731181 0.727204 1.463042 2.439043 1.177436 1.897886 0.879549
18965831697 diff 1.98% -0.06% 0.26% 0.31% -0.04% -0.13% 0.00% -0.53% 2.53% -0.57% 3.09% 11.75% -0.29% 0.16% 4.72% 1.55%

IPC report w/ #5145

Run # Branch Commit PR Updated astar copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc namd povray wrf xalancbmk Avg. Diff
18871592359 (base) feat-ubtb-use-fasttrain 14f4a29 #5145 2025-10-28T19:39:31Z 0.807507 0.464202 1.139789 0.730261 2.997342 1.735806 2.535753 1.164367 0.695311 0.847041 1.675045 3.354448 1.353185 2.007131 0.970846
18935641794 feat-ubtb-remove-takencnt 86dddb7 #5157 2025-10-30T21:12:27Z 0.827856 0.465855 1.120577 0.731361 3.006895 1.740222 2.532403 1.166595 0.760284 0.850924 1.675045 3.378833 1.333953 1.995335 0.970255
18935641794 diff 2.52% 0.36% -1.69% 0.15% 0.32% 0.25% -0.13% 0.19% 9.34% 0.46% 0.00% 0.73% -1.42% -0.59% -0.06% 0.70%

@XiangShanRobot

Copy link
Copy Markdown

[Generated by IPC robot]
commit: 56ae437

commit astar astar_simfrontend copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc milc_simfrontend namd povray wrf xalancbmk xalancbmk_simfrontend
56ae437

kunminghu-v3 branch:

commit astar astar_simfrontend copy_and_run coremark gcc gromacs hmmer-Vector lbm linux mcf microbench milc milc_simfrontend namd povray wrf xalancbmk xalancbmk_simfrontend
e088701
526430a
82957fb
6a53198
123d301
2e4c95e
ea82e26 0.763 2.138 0.439 1.005 0.659 3.004 1.629 2.530 1.110 0.713 0.731 1.419 1.638 2.183 1.181 1.895 0.840 3.448
44eaf57 0.763 2.138 0.439 1.005 0.659 3.004 1.629 2.530 1.110 0.713 0.731 1.419 1.638 2.183 1.181 1.895 0.840 3.448
c48286e 0.763 2.138 0.439 1.005 0.658 3.004 1.629 2.530 1.110 0.713 0.731 1.419 1.638 2.183 1.181 1.895 0.840 3.448
ba3c5f2 0.763 2.138 0.439 1.005 0.661 3.004 1.629 2.530 1.110 0.713 0.731 1.419 1.638 2.183 1.181 1.895 0.840 3.448

@rich-cake
rich-cake merged commit 4d9d83b into kunminghu-v3 Nov 3, 2025
33 of 36 checks passed
@rich-cake
rich-cake deleted the feat-ubtb-remove-takencnt branch November 3, 2025 03:23
rich-cake pushed a commit that referenced this pull request Dec 1, 2025
- `TakenCnt` is removed in #5157, but I forgot to delete its parameter
- no behaviour change now as `instOffsetBits = 1` when HasCExtension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: frontend Bpu, Ftq, Ifu, ICache, IBuffer topic: area To reduce area comsuption topic: performance To improve performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants