[OpenCL]OpenCL 總整理 - HackMD
文章推薦指數: 80 %
[OpenCL]OpenCL 總整理=== ## 安裝[install packets](https://askubuntu.com/a/850594/655911) ## 編譯[what is. Published LinkedwithGitHub Like Bookmark Subscribe [OpenCL]OpenCL總整理 === ##安裝 [installpackets](https://askubuntu.com/a/850594/655911) ##編譯 [whatisneededtocompileopenclonubuntu?(andbyextension,openclperiod)](https://stackoverflow.com/questions/7542808/what-is-needed-to-compile-opencl-on-ubuntu-and-by-extension-opencl-period) ##教學 *注意事項:影片是2013年,使用上需要注意資訊是否過期 *[OpenCL1.2:High-LevelOverview](https://www.youtube.com/watch?v=8D6yhpiQVVI) *[NVIDIA-IntroductiontoOpenCL](https://www.cc.gatech.edu/~vetter/keeneland/tutorial-2011-04-14/06-intro_to_opencl.pdf) *[TheOpenCLC++WrapperAPI](https://www.khronos.org/registry/OpenCL/specs/opencl-cplusplus-1.2.pdf) *[OptimizingComputerVisionApplicationsUsingOpenCLandGPUs](https://www.embedded-vision.com/platinum-members/embedded-vision-alliance/embedded-vision-training/documents/pages/opencl-gpus) ###名詞解釋 *platform:一個特定的OpenCL實作方式,ex.AMDAPP,NVIDIA以及Intel在自家硬體上實作OpenCL *context:一個patform,它可以看到一至數個可加速裝置(device),在runtime執行的時候能夠將運算link到硬體裝置上 *device:這邊的裝置指的是真正能用來加速的硬體,exCPU、GPU 名詞解釋-參考資料 *[Inopenclwhatisthedifferencebetweenplatform,contextanddevice?[closed]](https://stackoverflow.com/questions/12988986/in-opencl-what-is-the-difference-between-platform-context-and-device) *[Tutorial:SimplestartwithOpenCLandC++](http://simpleopencl.blogspot.tw/2013/06/tutorial-simple-start-with-opencl-and-c.html) ###基本的模型解釋 ![](https://i.imgur.com/mI9FtZ3.png) Device內部的大致長相 ![](https://i.imgur.com/vN9sUwk.png) ![](https://i.imgur.com/iYBaLdf.png) ComputingUnit(CU)內部是Device內的基本處理單元 內部擁有數個ProcsessingElement(PE)以及LocalMemory 我們可以簡單的把PE看做一個非常簡單的處理器(processor) 並且,所有指令都是在PE上執行 ![](https://i.imgur.com/6IQFX7e.png) 記憶體區域 ![](https://i.imgur.com/fYj9T4V.png) *GlobalMemory *與所有PE共享 *Host也能存取(access) *MemoryMap *從GlobalMemory複製資料 *ConstantMemory *與所有PE共享 ![](https://i.imgur.com/LQe9a40.png) *LocalMemory *只有與CU內部的PE共享 *與CU內部的PE共享資料非常有效率 *不能夠跨CU存取 *PrivateMemory *只有專屬的單個PE擁有存取權 ###OpenCLGPU架構 ![](https://i.imgur.com/oTj8Urt.png) OpenCL加法示意圖 ![](https://i.imgur.com/ZPEfkbx.png) ##開始撰寫OpenCL程式 *[GettingstartedwithOpenCLandGPUComputing](https://www.eriksmistad.no/getting-started-with-opencl-and-gpu-computing/) *[20.1.3什麼是make與configure](http://linux.vbird.org/linux_basic/0520source_code_and_tarball.php#intro_make) >執行make時,make會在當時的目錄下搜尋Makefile(ormakefile)這個文字檔,而Makefile裡面則記錄了原始碼如何編譯的詳細資訊 *[OpenCL語法](https://hackmd.io/s/SJBMZEi2-) --- ##OpenCV以OpenCL加速 *[以OpenCL加速程式](https://hackmd.io/BwVmCZIRgTgWhgE2AUzgFhitAjFBDAYzn2B3wDMYYA2YABhAGYg=?both#以-opencl-加速程式) --- ##OpenCLEventModel 詳細請看下面的連結 *[OpenCL-EventModel](https://hackmd.io/s/H1Ig0873b) ######tags:`OpenCL` × Signin Email Password Forgotpassword or Byclickingbelow,youagreetoourtermsofservice. SigninviaFacebook SigninviaTwitter SigninviaGitHub SigninviaDropbox SigninviaGoogle NewtoHackMD?Signup
延伸文章資訊
- 1OpenCL_百度百科
OpenCL(全稱Open Computing Language,開放運算語言)是第一個面向異構系統通用目的並行編程的開放式、免費標準,也是一個統一的編程環境,便於軟件開發人員為高性能 ...
- 2OpenCL | NVIDIA Developer
OpenCL™ (Open Computing Language) is a low-level API for heterogeneous computing that runs on CUD...
- 3AI運算加速系列-OpenCL 高效能平行運算實作班(資展國際)
深度學習OpenCL (Open Computing Language)是基於C及C++語言,以同一種語言實現跨越CPUs、GPUs、CELL、DSP等異質(heterogeneous)執行平台...
- 4OpenCL Overview - The Khronos Group Inc
OpenCL™ (Open Computing Language) is an open, royalty-free standard for cross-platform, parallel ...
- 5OpenCL 教學(一)
OpenCL 是由Khronos Group 針對異質性計算裝置(heterogeneous device)進行平行化運算所設計的標準API 以及程式語言。所謂的「異質性計算裝置」,是 ...