PGCL™ is an OpenCL™ framework for compiling and running OpenCL 1.1 embedded profile applications on the ST-Ericsson NovaThor™ U8500 and follow-on platforms using a single ARM core as the OpenCL host and multiple ARM cores as an OpenCL computing device.
The PGCL OpenCL framework consists of five components:
- PGCL driver—a command-level driver for processing source files containing C99, C++ or OpenCL program units. The PGCL driver command pgcl invokes an OpenCL host compiler to create OpenCL host executables and then invokes the PGI OpenCL device compiler to create statically compiled OpenCL device programs packaged as binary shared objects.
- C/C++ compiler for OpenCL host (host compiler)—compiles C99 or C++ program units for the OpenCL host. PGCL uses gcc and g++ as host compilers.
- PGI OpenCL device compiler—compiles OpenCL kernels for an OpenCL computing device.
- OpenCL Platform Layer—a library of routines to query platform capabilities and to create OpenCL device execution contexts from host code using calls to the OpenCL API.
- OpenCL Runtime Layer—a library of routines and a runtime system used to set up and execute OpenCL programs on an OpenCL computing device using calls to the OpenCL API.
The PGCL OpenCL framework is installed and compilation is performed on Linux-x86 (cross-compilation) to produce executables for ST-Ericsson ARM platforms running Android. The PGCL driver, pgcl, can be used to compile OpenCL host applications and to statically compile OpenCL device programs (or “kernels”). Using command line options, the pgcl driver invokes both an OpenCL host C/C++ compiler and the PGI OpenCL device compiler. Unless otherwise specified, the output of pgcl is:
- One OpenCL host ARM executable for the target operating system compiled using the host C/C++ input source files.
- One or more OpenCL programs (collections of kernels) compiled using the OpenCL input source files and packaged as ARM shared object files for the target operating system.
The pgcl driver does not support host source code and OpenCL device source code in the same file. Refer to the PGCL reference information for a detailed description of supported host and device source code file names, and how they are processed.
PGCL supports the Linux-x86 gcc and g++ compilers included in the Android NDK as host compilers. These compilers target ARM processors. The pgcl driver supports most host compiler options. Replacing calls to gcc or g++ with calls to pgcl in makefiles retains compatibility plus adds support for resolving references to OpenCL API calls. This approach helps to simplify adding OpenCL kernels to existing applications and makefiles. The OpenCL host compiler is selectable from the pgcl command line. Additional OpenCL host compilers may be supported in future releases.
The PGI OpenCL device compiler processes OpenCL device program units, or kernels. The OpenCL 1.1 language includes some restrictions to standard C99, and also some extensions in the form of new data types, syntax to support operations on vector types, and built-in support for many mathematical functions (sin, cos, etc). A detailed list of the OpenCL language features supported in current release of PGCL can be found in Appendix C of the PGCL Release Notes.
The PGCL OpenCL Platform Layer and Runtime Layer are provided as libraries bundled with the PGI OpenCL framework. Dynamic runtime compilation of OpenCL kernels on Android is supported in PGCL 12.4 and later releases. Other than the limitations implied by the OpenCL embedded profile, the OpenCL 1.1 Platform and Runtime Layer APIs are fully supported. Other PGCL features include:
- Complete support for all OpenCL 1.1 embedded profile language features.
- ARMv7 code generation, including automatic generation of NEON SIMD instructions for operations on OpenCL vector and floating-point data types, and for vectorizable for loops operating on scalar data types
- Support for launching OpenCL programs from within the Dalvik virtual machine (part of the Android platform)
- Offline static compilation of OpenCL programs and kernels
- A command-level interface designed to enable incremental and seamless integration into existing makefiles and application build infrastructures
Why Choose PGCL
PGCL offers several advantages and benefits compared to other programming environments for multi-core embedded and mobile processors including:
- PGI Optimizations + LLVM—PGCL integrates PGI world-class compiler optimization technologies developed over 20 years in HPC with the emerging de facto standard LLVM code generation infrastructure and multi-core ARM. PGCL benefits from PGI expertise in GPU and cross-platform optimizations and the ability to integrate with other device compilers at the LLVM level.
- Packaging & Productization—PGCL is a commercial quality OpenCL implementation from a recognized and experienced supplier of performance-oriented compilers and development tools. In addition to leading-edge technical capabilities, all PGI products include comprehensive technical support, regular fully qualified product updates and the full backing of an organization of software professionals with a “customer first” mindset.
- A Comprehensive Integrated OpenCL Programming Solution—PGCL’s unique ability to integrate device compilers from other vendors enables a single, consistent OpenCL programming environment across multi-core ARM and a variety of GPUs/accelerators. With PGCL, you don’t need to learn two different toolchains to build different parts of your application.
- Easy to Use and Easy to Get Started—PGCL integrates easily into existing command-level and GUI-based development environments so you can enable incremental use of OpenCL now with minimal impact on productivity. With PGCL, you can continue to use your existing config scripts and Makefiles.
- Free to End-user Developers
- Development Host:
- Processor: 64-bit AMD64, 64-bit Intel 64 or 32-bit x86 processor-based workstation.
- Operating System: Linux Ubuntu 10.04
- Memory: 256 MB or more.
- Hard Disk: 300 MB during installation, 300 MB to hold installed software.
- Peripherals: Mouse or compatible pointing device.
- Other: Adobe Acrobat Reader for viewing documentation.
- Targets Devices:
- Processor: ST-Ericsson U8500 and later platform (ARM-v7a architecture with multiple ARM processing cores)
- Operating System: Android 2.3.3 Platform with NDK toolchain r5b and SDK API level 10
See more at http://www.pgroup.com/products/pgcl.htm