Introductory Tutorial to OpenCL

Introductory Tutorial to OpenCL

Skip Navigation Links Home > GPU Tools > ATI Stream SDK > Introductory Tutorial to OpenCL

Benedict R. Gaster, AMD Architect, OpenCL

AMD just published its public OpenCL Beta for the CPU, soon to be followed with support for AMD’s latest GPUs. OpenCL is a young technology, and, while a specification has been published (www.khronos.org/registry/cl/ ), there are currently few documents that provide a basic introduction with examples. This article helps make OpenCL easier to understand and implement.

Note that:

  • I work at AMD, and, as such, I will test all example code on our implementation for both Windows® and Linux®; however, my intention is to illustrate the use of OpenCL regardless of platform. All examples are written in pure OpenCL and should run equally well on any implementation.
  • I have done my best to provide examples that work out-of-the-box on non-AMD implementations of OpenCL, but I will not be testing them on non-AMD implementations; therefore, it is possible that an example might not work as expected on such systems. If this is the case, please let me know via our Stream Computing forum, and I will do my best to rectify the code and publish an update.

The following “Hello World” tutorial provides a simple introduction to OpenCL. I hope to follow up this first tutorial with additional ones covering topics such as:

  • Using platform and device layers to build robust OpenCL
  • Program compilation and kernel objects
  • Managing buffers
  • Kernel execution
  • Kernel programming - basics
  • Kernel programming - synchronization
  • Matrix multiply - a case study
  • Kernel programming - built-ins

詳情可訪問:http://developer.amd.com/gpu/ATIStreamSDK/pages/TutorialOpenCL.aspx

 

發佈了48 篇原創文章 · 獲贊 7 · 訪問量 21萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章