透過您的圖書館登入
IP:3.147.85.201
  • 學位論文

以機器學習快速的搜尋最佳編譯器選項集合

Finding the Best Compiler Optimization Option Set Rapidly via Machine Learning

指導教授 : 洪士灝

摘要


現代的編譯器,大部分都提供了為數不少的優化選項。在適宜的搭配下,這些選項對於提高程式的執行效能,有著相當程度的助益。但是,如果與程式之間的搭配出了問題,也會產生反效果,對程式的效能造成傷害。因此,該如何正確的使用這些選項便成了相當重要的課題。為了做出正確的選擇,必須對個別優化選項有相當程度的了解,同時,得一併考慮選項之間有可能的交互影響。再來,也得對將進行優化的程式所持有之特性有深刻的認知。在綜合各種因素之後,才有可能做出最適切的選擇。但這動作具有相當的門檻。對大部分的使用者來說,並不是一件容易的事。尤其當選項有相當的數目時,對這工作的複雜度來說,更是爆炸性的增加。有許多的研究專注在如何有系統的挑選優化選項,並將這複雜度降低到人們可以接受的範圍。但複雜度降低在某些情況並不等同於所需時間可被接受。因此,本文利用了機器學習的技巧,將經驗轉化而建立起一模型。透過此模型,將能幫助使用者找出與程式相對應的編譯器優化選項,並大幅縮短整各尋找過程所需要的時間。

並列摘要


For a compiler to find a set of options that result in an optimal program execution is a NP-hard problem, especially when there are a lot of options to choose. For a large program, finding the optimal set of compiler options can take an enormous amount of time. Thus, methods have been proposed to shorten the searching time by reducing the complexity of the problem. This thesis proposes a different approach to solve the problem via machine learning techniques. The goal of this approach is to give an acceptable answer in a short time. Using our approach we achieve a 5% improvement over the -O3 of GCC on a storage system and 7% on the MediaBench II. Moreover, the time our approach costs to get acceptable answer is only 1/100 of the time that CE Algorithm takes on a storage system.

參考文獻


[1] C. M. Bishop. Neural Networks for Pattern Recognition.Oxford University Press, Oxford, UK, 1996.
[2] D. W. Hosmer and S. Lemeshow. Applied Logistic Regression.Wiley & Sons, Inc, 2000.
[3] Z. Pan and R. Eigenmann. Fast automatic procedure-level performance tuning. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques, September 2006.
[4] Z. Pan and R. Eigenmann. Fast and effective orchestration of compiler optimizations for automatic performance tuning. In Proceedings of the International Symposium on Code Generation and Optimizatin, pages 319–332, 2006.
[5] Z. Pan and R. Eigenmann, Rating Compiler Optimizations for Automatic Performance Tuning, Proceedings of the 2004 ACM/IEEE conference on Supercomputing, p.14, November 2004.

延伸閱讀