Multiperspective Perceptron Predictor with TAGE * 07/16/96 Multiperspective Perceptron Predictor with TAGE Daniel A. Jiménez Department of Computer Science & Engineering Texas A&M University *
Multiperspective Idea Instead of just global/local history, use a wide range of features Multiple perspectives on branch history Multiperspective Perceptron Predictor Hashed Perceptron Sum weights indexed by hashes of features Update weights using perceptron training Contribution is a wide range of features
Main Idea “Statistical corrector” in TAGE-SC-L is a perceptron predictor Augment it with multiperspective features
Traditional Features SC already contains some traditional features GHIST – global branch outcome history LOCAL – 11-bit local history Callstack history
Novel Features IMLI – from Seznec’s innermost loop iteration counter work: When a backward branch is taken, count up When a backward branch is not taken, reset counter I propose an alternate IMLI When a forward branch is not taken, count up When a forward branch is taken, reset counter This represents loops where the decision to continue is at the top Typical in code compiled for size or by JIT compilers Forward IMLI works better than backward IMLI on these traces I use both forward and backward in the predictor
Novel Features cont. MODHIST – modulo history Branch histories become misaligned when some branches are skipped MODHIST records only branches whose PC is congruent to 0 modulo some n. Hopefully branches responsible for misalignment will not be recorded Try many values of n to come up with a good MODHIST feature
Novel Features cont. MODPATH – same idea with path of branch PCs RECENCY Keep a recency stack of n branch PCs managed with LRU replacement Hash the stack to get the feature RECENCYPOS Position (0..n-1) of current branch in recency stack, or n if no match Works surprisingly well
Novel Features cont. BLURRYPATH Shift higher-order bits of branch PC into an array Only record the bits if they don’t match the current bits Parameters are the depth of the array and the number of bits to truncate Give a view of the region a branch came from rather than the precise location
Novel Features cont. ACYCLIC The current PC indexes a small array, recording the branch outcome there The array always has the latest outcome for a given bin of branches. Acyclic – loop or repetition behavior is not recorded
Putting it Together Statistical corrector of TAGE-SC-L is augmented with these features Each feature is computed, hashed, and XORed with the current PC Resulting index selects weight from a table Weights are summed, thresholded to make prediction Weights are updated with perceptron learning
Optimizations Searched for good TAGE table sizes to enable sufficient perceptron table sizes Optimized TAGE hash functions for ARM Adaptive threshold training Hashing some tables together with IMLI and RECENCYPOS
Contribution of Features (64KB)
Results 8KB – 5.226 MPKI 64KB – 4.048 MPKI Unlimited – 2.967 MPKI