Thursday, December 11, 2008

OpenCL 1.0 specification released

I wrote a few posts about CUDA and utilizing power of the graphic cards for other types of calculations mainly for physics calculations. Nvidia is one of the major contributors for OpenCL (Open Computing Language) but not the only one. Working group includes Apple, AMD, ARM, Broadcom, IBM, Ericsson, Intel, Samsung, Texas Instruments, Activision, Blizzard and others. Obviously both hardware and software companies are interested in development of OpenCL.
Khronos group has released 1.0 specification on it’s site as PDF file and header files. PDF is a big 302 pages document and will be required reading for all keen developers.
What is OpenCL? From their definition it is:

OpenCL (Open Computing Language) is the first open, royalty-free standard for general-purpose parallel programming of heterogeneous systems. OpenCL provides a uniform programming environment for software developers to write efficient, portable code for high-performance compute servers, desktop computer systems and handheld devices using a diverse mix of multi-core CPUs, GPUs, Cell-type architectures and other parallel processors such as DSPs.

OpenCL is created with several goals in mind. These include having open, royalty free standard for heterogeneous parallel computing, cross vendor software portability, creating foundation layer for parallel computing ecosystem.

Anatomy of OpenCL

Language Specification
  • C-based cross-platform programming interlace
  • Subset of ISO C99 with language extensions - familiar to developers
  • Well-defined numerical accuracy - IEEE 754 rounding behavior with defined maximum error 
  • Online or offline compilation and build of compute kernel executables 
    Includes a rich set of built-in functions
Platform Layer API
  • A hardware abstraction layer over diverse computational resources
  • Query, select and initialize compute devices
  • Create compute contexts and command-queues
Runtime API
  • Execute compute kernels
  • Manage scheduling, compute, and memory resources

Memory model

What is next? Khronos will release conformance tests to ensure high quality implementations. This of course means we have wait to get first applications built on 1.0 specification of OpenCL. OpenGL is proven technology and implemented in thousands of applications. OpenCL has great potential since it is designed to integrate with OpenGL and other 3D APIs.
Time will tell how good it is.

No comments:

Post a Comment