All models

BranchNet CNN Branch Predictor

CNN branch predictor with slices over several history lengths, trained offline for hard-to-predict branches.

59 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (27 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
1.6M
Operations
59
Framework
PyTorch
Recurrent
No
Published
53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO 2020)
Cited by
49 (as of 28 October 2026)
Authors
Siavash Zangeneh, Stephen Pruett, Sangkug Lym, Yale N. Patt
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14992
Graph hash
5d30ea2fcd784bf62cbcc5feccc09a45a8d06cc3414a9613f339777b741614e3
Skeleton hash
4a2d9c3d1f42abc2c4c56ec093411885f552ecb54261136f1b5d5f18d53bb63e
Architecture hash
f97b6e2886351eec3bd4104664cde2230e5ca56bf06f81dd60aa79b18340ecbb
Diagram SHA-256
ca497a2d3985771a7c398f7cacdc94ecfd44e2e218362b501ec8c1d53397b3d2
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

BranchNet is a convolutional neural network for branch prediction in processors, trained offline to predict branches that are hard for traditional branch predictors. The authors argue that the trouble the TAGE predictor has in identifying correlated branches deep in a noisy global branch history is a fundamental limitation of runtime branch prediction. At runtime BranchNet predicts a few hard-to-predict branches and TAGE-SC-L predicts the remaining ones.

The paper presents two variants, Big-BranchNet and Mini-BranchNet. Big-BranchNet is a pure software model, used to show the available headroom, and Mini-BranchNet is a smaller model co-designed with a practical inference engine. Big-BranchNet is composed of 5 feature extraction sub-networks, which the paper calls slices, and two fully-connected layers. Each slice uses an embedding layer, a convolution layer and a sum-pooling layer to extract features from the branch history. The slices operate on different history lengths that form a geometric series. Each branch in the history is represented as an integer built from its direction and the least significant bits of its program counter. The final fully-connected layer is a single neuron with a Sigmoid activation that makes the prediction.

The paper reports that this hybrid of BranchNet and TAGE-SC-L reduces mispredictions per kilo instructions (MPKI) on SPEC2017 Integer benchmarks by 7.6% compared with a very large MTAGE-SC baseline.

Key idea. BranchNet is a CNN trained offline that predicts a few hard-to-predict branches at runtime while TAGE-SC-L predicts the remaining branches.

  • BranchNet
  • Big-BranchNet
  • Mini-BranchNet
  • CNN branch predictor
  • branch prediction
  • hard-to-predict branches
  • offline-trained branch predictor
  • global branch history

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@inproceedings{Zangeneh_2020, title={BranchNet: A Convolutional Neural Network to Predict Hard-To-Predict Branches}, url={http://dx.doi.org/10.1109/MICRO50266.2020.00022}, DOI={10.1109/micro50266.2020.00022}, booktitle={2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO)}, publisher={IEEE}, author={Zangeneh, Siavash and Pruett, Stephen and Lym, Sangkug and Patt, Yale N.}, year={2020}, month=Oct, pages={118–130} }