Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dependence-Based Value Prediction Yiannakis Sazeides University of Cyprus UPC-Barcelona 17/5/2001.

Similar presentations


Presentation on theme: "Dependence-Based Value Prediction Yiannakis Sazeides University of Cyprus UPC-Barcelona 17/5/2001."— Presentation transcript:

1 Dependence-Based Value Prediction Yiannakis Sazeides University of Cyprus yanos@ucy.ac.cy UPC-Barcelona 17/5/2001

2 Yanos Sazeides University of Cyprus UPC 17/5/01 Motivation Improve Performance (reduce complexity, save power...) What limits performance? Dependences Break dependences: Prediction Exploits regularity and/or non- uniformity in predicted information

3 Yanos Sazeides University of Cyprus UPC 17/5/01 Predicted Information Architectural –dependences: control, address, value, memory Non-Architectural –structural constrains: cache misses, bank conflicts –reduce hardware complexity: cache sets, shared patterns

4 Yanos Sazeides University of Cyprus UPC 17/5/01 Use of Predicted Information Speculative/Non-Speculative –Depends on whether predicted information can directly/indirectly cause an incorrect update of architected state non-speculative: branch prediction for instruction prefetching speculative: branch prediction for instruction execution Hardware/Software

5 Yanos Sazeides University of Cyprus UPC 17/5/01 Trends Identify and eliminate predictability at computational levels below programming Predictors in almost all high performance processors and many compilers Technological evolution and limitations will increase latency and make predictive techniques more important –deeper pipelines –fast processor/slow memory –distributed microarchitectures

6 Yanos Sazeides University of Cyprus UPC 17/5/01 Our motivation Can value prediction help? How to use value predictability? Wholistic approach: all types not just vp and coarser grain Absolutely curious to discover, understand and use the esoteric program properties causing the predictability and non-uniformity observed in program information

7 Yanos Sazeides University of Cyprus UPC 17/5/01 This talk... Hypothesis: dependence information influences the predictability of program values Propose and evaluate various dependence-based value predictors Approach: theoretical and practical Work in progress...

8 Yanos Sazeides University of Cyprus UPC 17/5/01 Outline Introduction Background on value prediction Dependence Info and Predictability Dependence-based Value Predictors Results Future work

9 Yanos Sazeides University of Cyprus UPC 17/5/01 Value Sequences Produced by Instructions Basic Sequences –Constant: 0 0 0 0 0 –Stride: 4 3 2 1 0 –Non-Stride: -1 23 10 94 Repeating Sequences (composition of basic sequences): –Repeated Stride: 4 3 2 1 0 4 3 2 1 0 –Repeated Non-Stride: -1 23 10 94 -1 23 10 94

10 Yanos Sazeides University of Cyprus UPC 17/5/01 Local History Value Predictors Computational-Based –compute next value by performing a computation on previous value(s) Context-Based –learn the value that follows a finite number of previous values (context) and predict that value when context repeats –need to observe a context-value before predicting correctly Hybrid: Delta-Predictor

11 Yanos Sazeides University of Cyprus UPC 17/5/01 Last Value Predictor

12 Yanos Sazeides University of Cyprus UPC 17/5/01 Stride Predictor

13 Yanos Sazeides University of Cyprus UPC 17/5/01 Context-Based Predictor

14 Yanos Sazeides University of Cyprus UPC 17/5/01 Hybrid Predictor

15 Yanos Sazeides University of Cyprus UPC 17/5/01 Causes of Predictability Model Based on Dependence Graph Robustness: predictability due to program control structure and immediate values not input data Predictability generation-propagation termination –need to consider info beyond local scope –dependence information holds potential to increase accuracy of value prediction

16 Yanos Sazeides University of Cyprus UPC 17/5/01 Hypothesis/Fact The predictability of an instruction is determined by the information on the dependence path that leads to it Predict the value produced by an instruction based on the values and/or information of its predecessors

17 Yanos Sazeides University of Cyprus UPC 17/5/01 Outline Introduction Background on value prediction Dependence Info and Predictability Dependence-based Value Predictors Results Future work

18 Example

19 Yanos Sazeides University of Cyprus UPC 17/5/01 Observations All instructions can trace dependence back to $6 $6 used as an induction variable Use information about $6 to get predictions

20 Yanos Sazeides University of Cyprus UPC 17/5/01 Example Use value in $6 to predict instruction 7: Value of $6 Output of Instr. 7 0,..,13, 15, 31..63 1 14, 16..300 Local history with <47 previous values mispredicts

21 Yanos Sazeides University of Cyprus UPC 17/5/01 Dependence-Based Prediction Prediction based on information from the component of the predicted instruction i Output = PF(Component i ) Component: –backward dynamic data dependence slice –node info: pcs, optypes, immed., outcomes –livein values (values not produced by component, register and memory)

22 Yanos Sazeides University of Cyprus UPC 17/5/01 Dependence-Based Prediction In general, use information from components of previous instructions Output = PF(C i-n..C i-1,C i )

23 Yanos Sazeides University of Cyprus UPC 17/5/01 Perspective Virtually all predictors are functions of component approximations to values “Practical Limitation”: predictors can rely on a subset of components and information

24 Yanos Sazeides University of Cyprus UPC 17/5/01 Component Approximation Approximation accuracy depends on information used from component What limits approximation accuracy: –finite resources and aliasing –amount of information to be stored –how soon a prediction can be made

25 Yanos Sazeides University of Cyprus UPC 17/5/01 Existing Predictors “Interesting” with how little information predictors work well Global History Branch Predictors –use information from multiple previous branch components Output=PF(C i-n..C i-1,C i ) –Note components may be unrelated (longer learning and destructive aliasing)

26 Yanos Sazeides University of Cyprus UPC 17/5/01 Dependence Information A lot of information to choose from –Which predecessors: recent, recurrent, earliest, all –Information values register, memory names pc, optypes, immediates dependence distance –Propagation through registers or memory

27 Yanos Sazeides University of Cyprus UPC 17/5/01 Ideas… predict based on: –Values of recurrent predecessors values indicating location in program

28 Based on Recurrent Predecessors

29 Yanos Sazeides University of Cyprus UPC 17/5/01 Ideas… predict based on: –Values of recurrent predecessors values indicating location in program no sp sp with last SP value and PC selection of stride

30

31 Yanos Sazeides University of Cyprus UPC 17/5/01 Dependence-Based Stack Pointer Predictor

32

33 Yanos Sazeides University of Cyprus UPC 17/5/01 Ideas… predict based on: –Values of recurrent predecessors values indicating location in program no sp sp with last SP value and PC selection of stride –Distance from predecessors distance indicates coordinates in program predict values not based on values no sp

34 Based on Dependence Distance

35 Yanos Sazeides University of Cyprus UPC 17/5/01 Ideas… predict based on: –Values of recurrent predecessors values indicating location in program no sp sp with last SP value and PC selection of stride –Distance from predecessors distance indicates coordinates in program predict values not based on values no sp –Most recently known processor state isolate non-determinism

36 Based on Recent Predecessors

37 Yanos Sazeides University of Cyprus UPC 17/5/01 Outline Introduction Background on value prediction Dependence Info and Predictability Dependence-based Value Predictors Results Future work

38 Yanos Sazeides University of Cyprus UPC 17/5/01 Prediction Process To predict an instruction –Construction of Dependence Record (DR) approximation of the information on the component of the instruction –Use DR to obtain a prediction (directly or indirectly)

39 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP Predictor with CT

40 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP Register (DBVP-R) Component subset: instructions those fetched but have not updated yet the architectural state –isolates the non-determinism in execution Information used: –Generate Registers(GR):livein registers (most recently known architected state) –Dependence Path Id(DPI):pcs, optypes, immediates (info about unknown state)

41 Yanos Sazeides University of Cyprus UPC 17/5/01 Construction of DR for an instruction (GR)

42 Yanos Sazeides University of Cyprus UPC 17/5/01 Construction of DR for an instruction - Many instructions same GRs - Differentiate with DPI

43 Yanos Sazeides University of Cyprus UPC 17/5/01 DR Construction Information encoded in instructions May be done incrementally off-line and stored in a table where it can be retrieved (imprecise?) No investigation of implementation specifics of DR construction Memory instructions propagate the dependence info through address operands (can be problematic - later)

44 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-R Predictor History Table indexed with register names contains architected state

45 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP Memory (DBVP-M) DBVP-R ignores memory dependences –often no correlation between load address and value DBVP-M: same as DBVP-R with additional functionality and information: –propagation of DR through memory convert def-store-load-use dependence in a component to def-use –livein memory locations(generate locations GLs): converts values from memory to liveins

46 Yanos Sazeides University of Cyprus UPC 17/5/01 DR Propagation Through Memory (spilled variable)

47 Yanos Sazeides University of Cyprus UPC 17/5/01 Livein Memory Locations

48 Yanos Sazeides University of Cyprus UPC 17/5/01 Generate Locations (GL) and Memory History Table(MHT) GL is an index into a table (MHT) with values written to memory Store-load dependent pairs are assigned MHT location Memory Dependence Prediction mechanisms can provide the extra functionality required by DBVP-M

49 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-M Predictor

50 Yanos Sazeides University of Cyprus UPC 17/5/01 Differences DBVP and CB Information used to access tables and table sizes –History table is register indexed (vs PC indexed) +smaller +may be easier to manage speculative updates -possibly provide predictions later –Smaller context is required to capture repeated behavior

51 Yanos Sazeides University of Cyprus UPC 17/5/01 Outline Introduction Background on value prediction Dependence Info and Predictability Dependence-based Value Predictors Results Future work

52 Yanos Sazeides University of Cyprus UPC 17/5/01 Experimental Framework SPECINT95 Benchmarks Study predictors with simple delay model: –predict d instructions (or up to first misprediction) –update d is also maximum component size DPI: pc, optypes and immediates

53 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-R: DPI Information d=1, 64K entry VPT

54 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-R: VPT Size d=1

55 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-R: Sensitivity to Delay 64K VPT size

56 Yanos Sazeides University of Cyprus UPC 17/5/01 Problems with increasing d Capacity: instruction in different components requires more information to be learned

57 Component Redundancy

58 Yanos Sazeides University of Cyprus UPC 17/5/01 Problems with increasing d Capacity: instruction in different components requires more information to be learned Destr. Aliasing: multiple instances of same instruction same prediction

59 Multiple instances same GR and DPI

60 Yanos Sazeides University of Cyprus UPC 17/5/01 Problems with increasing d Capacity: instruction in different components requires more information to be learned (destructive aliasing) Destr. Aliasing: multiple instances of same instruction same prediction Capacity: increasing d means more information needs to be learned

61 Yanos Sazeides University of Cyprus UPC 17/5/01 Information to be learned Two combinations

62 Yanos Sazeides University of Cyprus UPC 17/5/01 Information to be learned 64 combinations

63 Yanos Sazeides University of Cyprus UPC 17/5/01 Solutions for increasing d Careful partitioning Transform different structure to same Better DPI: –position –count of outstanding instances of an instruction –predict only liveouts Predict based on other information –recurrence, dependence distance...

64 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-M: MHT Size d=1, 64K VPT size

65 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP-M: Sensitivity to Delay

66 Yanos Sazeides University of Cyprus UPC 17/5/01 DBVP vs CB

67 Yanos Sazeides University of Cyprus UPC 17/5/01 Conclusions Dependence-based prediction holds potential to improve accuracy Use dependence information for prediction Propagation of dependence information through memory useful for increased accuracy

68 Yanos Sazeides University of Cyprus UPC 17/5/01 Current and Future Work Refinement and evaluation of dependence-based prediction methods Evaluation in a processor DR construction Characterize program full components –size, uniqueness, correlation to predictability

69 Yanos Sazeides University of Cyprus UPC 17/5/01 Other Work/Interests Prediction and Speculation Program Behavior Distributed Microarchitectures SMT Benchmark characterization

70 I had a great time - thank you all! Hasta luego amigas y amigos!


Download ppt "Dependence-Based Value Prediction Yiannakis Sazeides University of Cyprus UPC-Barcelona 17/5/2001."

Similar presentations


Ads by Google