Author: |
張潘立 Pan-Li, Chang |
---|---|
Thesis Title: |
優化在異構性平台的OpenCL程式撰寫架構 -以光追蹤為例 Optimization of OpenCL Programming Structure On Heterogeneous Platforms– A Case Study of Ray Tracing |
Advisor: |
張鈞法
Chang, Chun-Fa |
Degree: |
碩士 Master |
Department: |
資訊工程學系 Department of Computer Science and Information Engineering |
Thesis Publication Year: | 2013 |
Academic Year: | 101 |
Language: | 中文 |
Number of pages: | 49 |
Keywords (in Chinese): | 光追蹤 、跨平台 、開放計算語言 、計算機圖學 、優化 、通用圖形處理器 、中央處理器 、平行計算 |
Keywords (in English): | Ray tracing, Heterogeneous platforms, OpenCL, Computer graphic, Optimization, GPGPU, CPU, Parallel computing |
Thesis Type: | Academic thesis/ dissertation |
Reference times: | Clicks: 207 Downloads: 12 |
Share: |
School Collection Retrieve National Library Collection Retrieve Error Report |
現今使用GPU(圖形運算單元)協助CPU(中央運算單元)運算已經是常見的程式優化方式,GPU藉由其核心數遠大於CPU並且可進行SIMD(Single instruction, multiple data)平行運算之優勢可以大幅度的提升程式的效能。
OpenCL(Open Computing Language)則是一種異構性平台撰寫之框架,由於這是一個開放性的規範,因此各大廠牌之GPU與CPU皆有針對OpenCL框架下進行實作甚至已經有部分嵌入式系統的圖形處理器與中央處理器也逐漸開始支援,本篇研究即是以OpenCL平台下各個不同廠牌之CPU&GPU之運行為題,能夠找出優化各個硬體裝置於OpenCL平行化程式的一些方法與經驗。
光追蹤是計算機圖學中一項非常泛用的技術,主要是以追蹤從眼睛開始灑出去無數的光線束藉以去嘗試碰撞空間中的立體物件,並經由一系列的物理模擬計算(如反射、折射、光影與其他……),最後轉為每個點的顏色並產生呈現在眼睛上的影像。然而此種演算法的特色因為要灑出龐大的光線束量,並且幾乎都是獨立作業的方式分別運行計算,因此該演算法很符合使用OpenCL平行運算的特性,但是其中OpenCL還是有諸多使用上的條件與限制,這些會在本篇會有更詳細的說明。
最後能藉由本篇論文能分享一些使用OpenCL平行化運算優化程式設計技巧以及設定相關參數的微調,以達到更好的效能。
[Du12] P. Du, R. Weber, P. Luszczek, S. Tomov, G. Peterson, J. Dongarra:
From CUDA to OpenCL: Towards a Performance-portable Solution for Multi-platform GPU Programming. Elsevier Science Publishers B. V. Amsterdam, 2012.
[GHKMS11] B. Gaster L. Howes, D. R. Kaeli, P. Mistry, D. Schaa: Heterogeneous Computing with OpenCL. Morgan Kaufmann, 2011.
[KH12] R. Karrenberg and S. Hack: Improving Performance of OpenCL on CPUs. Springer-Verlag Berlin, 2012.
[MGMF11] A. Munshi, B. Gaster, T. G. Mattson, J. Fung, D. Ginsburg:OpenCL Programming Guide. Addison-Wesley, 2011.
[Rei08] S. Reiter: Real–time Ray Tracing of Dynamic Scenes. Diploma Thesis, Institute for Graphics and Parallel Processing, Johannes Kepler University, 2008.
[SK11] J. Sanders, E. Kandrot: Cuda by Example:An Introduction to General-purpose GPU Programming. Addison-Wesley, 2011.
[Sca11] M. Scarpino: OpenCL in Action: How to Accelerate Graphics and Computations. Manning Publications, 2011.
[Shi09] M. Shih, Y.-F. Chiu, Y.-C. Chen, C.-F. Chang: Real-Time Ray Tracing with CUDA. In ICA3PP ’09: Proceedings of the 9th International Conference on Algorithms and Architectures for Parallel Processing, pp. 327–337, 2009.
[Suf07] K. Suffern: Ray Tracing from the Ground Up. A K Peters , 2007.
[Wat99] A. Watt: 3D Computer Graphics. Addison Wesley, 1999.
[Woo04] S. Woop: A Ray Tracing Hardware Architecture for Dynamic Scenes. Computer Graphics Lab, Saarland University, 2004.