天天看點

[Branch Prediction]處理器分支預測文獻筆記(1)

[文獻名] Calder, Brad, Dirk Grunwald, Michael Jones, Donald Lindsay, James Martin, Michael Mozer, and Benjamin Zorn. “Evidence-Based Static Branch Prediction Using Machine Learning.” ACM Trans. Program. Lang. Syst. 19, no. 1 (January 1997): 188–222. doi:10.1145/239912.239923.

[相關觀點]

1.綜述了基于程式的方法:利用程式結構去進行分支預測。

2.此文利用一套現有的程式作為依據去預測新程式中的分支行為。

3.優勢:基于程式結構技術,在不同的程式語言和風格間依然高效,不需要專家定義的啟發方法。

4.ESP branch prediction results in a miss rate of 20%, as compared

with the 25% miss rate obtained using the best existing program-based heuristics.

[Branch Prediction]處理器分支預測文獻筆記(1)

This is a standard neural network architecture. We also use a fairly standard neural network dynamics in which the activity of hidden unit i,denoted hi, is computed as

[Branch Prediction]處理器分支預測文獻筆記(1)

where xj is the activity of input unit j; wij is the connection weight from input unit j to hidden unit i; bi is a bias weight associated with the unit;and tanh is the hyperbolic tangent function

[Branch Prediction]處理器分支預測文獻筆記(1)

[文獻名] Reches, S., and Shlomo Weiss. “Implementation and Analysis of Path History in Dynamic Branch Prediction Schemes.” IEEE Transactions on Computers 47, no. 8 (August 1998): 907–12. doi:10.1109/12.707596.

[相關觀點]

1.以位址作為跳轉依據

[Branch Prediction]處理器分支預測文獻筆記(1)

and branch prediction depends on the actual program execution path.

2.利用了多種資訊進行異或操作。

3.We have observed that the lower address bits carry higher weight in every branch address or path history component (ADDR, HIST, and LAST)

4.本質上依舊依賴于GHR(全局跳轉曆史)

[Branch Prediction]處理器分支預測文獻筆記(1)

[文獻名] Chang, M.-C., and Y.-W. Chou. “Branch Prediction Using Both Global and Local Branch History Information.” Computers and Digital Techniques, IEE Proceedings - 149, no. 2 (March 2002): 33–38. doi:10.1049/ip-cdt:20020273.

[相關觀點]

1.比較全面的綜述,可以做參考。

2.局部與全局曆史記錄利用

[Branch Prediction]處理器分支預測文獻筆記(1)
[Branch Prediction]處理器分支預測文獻筆記(1)

3.舉例子說明了全局和局部兩種方法都有缺點。

4.優點:利用理論分析了G和L的優缺點,同時給出了結合兩者的方案。

5.缺點:在仿真結果并不是所有結果都比G和L要好。

[文獻名] Young, Cliff, and Michael D. Smith. “Static Correlated Branch Prediction.” ACM Trans. Program. Lang. Syst. 21, no. 5 (September 1999): 1028–75. doi:10.1145/330249.330255.

[相關觀點]

1.BP定義:Branch prediction, whether dynamic (hardware-based) or static (software-based), makes good guesses about likely branch targets and allows the instruction unit to fetch instructions early.When predictions are accurate, the execution engine can operate at full speed and performance improves.

2.相關性:Perhaps the most promising branch-related discovery of the last 10 years is that branches exhibit correlation: the outcome of a conditional branch is often determined by the branch's historical pattern of outcomes or the historical pattern of outcomes of its neighboring branches.

3.一些編譯器也可以發現出程式中的相關性。

4.對于編譯器的優化來說,最好是将程式看作圖而不是流水指令。

5.對程式段進行控制流圖(CFG)分析以确定“流”的頻率和關聯性。

[Branch Prediction]處理器分支預測文獻筆記(1)
[Branch Prediction]處理器分支預測文獻筆記(1)

6.If we can collect statistics about path frequencies, then some optimizations can exploit these di

erences in behavior to produce more effcient versions of the final program.

[Branch Prediction]處理器分支預測文獻筆記(1)
[Branch Prediction]處理器分支預測文獻筆記(1)
  1. Our SCBP transformation consists of four major steps: profiling, local minimization,global reconciliation, and layout.
[Branch Prediction]處理器分支預測文獻筆記(1)
[Branch Prediction]處理器分支預測文獻筆記(1)

8.利用最小的曆史資訊去确定相關性

[Branch Prediction]處理器分支預測文獻筆記(1)

最後利用計算程式設計導出控制樹,确定全局的預測方案。

[文獻名] Jiménez, Daniel A., and Calvin Lin. “Neural Methods for Dynamic Branch Prediction.” ACM Trans. Comput. Syst. 20, no. 4 (November 2002): 369–97. doi:10.1145/571637.571639.

[相關觀點]

1.單純利用神經網絡方法将會消耗很多資源。

2.使用了最簡單的感覺器方法。

3.也提到了overriding方法:前後2預測,接受一些延遲懲罰

4.優勢:They are easier to understand, they are simpler to implement and tune, they train faster, and they are computationally much less expensive。

4.指出PHT方法呈現指數級上升,而神經元為線性級。

[Branch Prediction]處理器分支預測文獻筆記(1)

5.正權重代表正相關,負權重代表負相關。

6.綜述了動态分支方法。二級适應。----缺點:别名使用問題。

7.We show that for a 4 KB hardware budget, a simple version of our method that uses a global history achieves a misprediction rate of 4.6% on the SPEC 2000 integer benchmarks, an improvement of 26% over gshare

[Branch Prediction]處理器分支預測文獻筆記(1)
[Branch Prediction]處理器分支預測文獻筆記(1)

[文獻名] Parikh, D., K. Skadron, Yan Zhang, and M. Stan. “Power-Aware Branch Prediction: Characterization and Design.” IEEE Transactions on Computers 53, no. 2 (February 2004): 168–86. doi:10.1109/TC.2004.1261827.

[相關觀點]

1.Yet, the branch predictor, including the BTB, is the size of a small cache and dissipates a nontrivial amount of power—typically about 7 percent and as much as 10 percent of the total processor’s power dissipation 指出cache消耗大

2.給出了數種關于降低功耗的方法:

Accuracy: For a given predictor size, better prediction accuracy will not change the power in the predictor.but will make the program run faster, hence reducing total energy.

Configuration: Changing the table size(s) can reduce power within the predictor, but may affect accuracy.

Number of Lookups: Reducing the number of lookups into the predictor is an obvious source of power savings, but it must come with no performance penalty.

Number of Updates: Reducing the number of predictor updates is another obvious way to reduce power, but is less efficient because misspeculated computation means that there are many more lookups than updates; because of this aspect, we do not further consider updates in this paper.

[文獻名] Falcon, A, J. Stark, A Ramirez, Konrad Lai, and M. Valero. “Better Branch Prediction through Prophet/critic Hybrids.” IEEE Micro 25, no. 1 (January 2005): 80–89. doi:10.1109/MM.2005.5.

[相關觀點]

***重點

1.對後續預測的結果的利用。

2.盡管存在多預測器的設計,但是它們使用的都是同一時刻的資訊。

[Branch Prediction]處理器分支預測文獻筆記(1)

3.闡述了後續預測器應該能檢測出前預測錯誤的百分比部分。

[Branch Prediction]處理器分支預測文獻筆記(1)

5缺點:需要兩套預測器,不可避免需要記憶體,加長流水線,性能與硬體數相關。沒有脫離以RAM為主的預測架構。

[文獻名] Jiménez, Daniel A. “Improved Latency and Accuracy for Neural Branch Prediction.” ACM Trans. Comput. Syst. 23, no. 2 (May 2005): 197–218. doi:10.1145/1062247.1062250.

[相關觀點]

1.闡述了神經網絡方法有最高的精度。

2.闡述了神經網絡方法難實踐因為預測的高延時

3.指出感覺器隻能區分線性可分的分支,也存在不可分的分支。

4.有些分支是不可分的,但是在程式路徑上可分。

5.結合了路徑曆史和模式曆史。

6.指出了感覺器需要長曆史記錄。這個方法可以使用更短的曆史記錄

7.Calder et al. [1995]提出使用神經網絡進行靜态分析。

8.Evers et al. 1998 感覺器之是以比二級預測精度高是因為其長曆史分析能夠有效提取相關性資訊。

9.Path:使用分支來的路徑而不是分支位址本身

10.指出了預測慢的主要源頭是讀取緩存

11.Rosenblatt 1962;感覺器起源

12.Jim´enez and Lin 2001,2002 感覺器使用

[Branch Prediction]處理器分支預測文獻筆記(1)

改善權重值的時間上選取以獲得更快的取值。

繼續閱讀