OpenCL Compiler Tools (OCLTools)

One of the more interesting features of OpenCL is that OpenCL kernels are compiled at runtime. This provides a great degree of flexibility for certain kinds of systems, however, it can be detrimental to others. Adding the time required for compilation to the runtime of your application somewhat negates the benifits of OpenCL acceleration in the first place. You must also consider that most businesses consider their source code to be valuable intellectual property and being forced to ship it with a product is not desirable.

OCLTools is a powerful, yet compact, suite of tools that provides developers with more alternatives to kernel compilation. OCLTools enables you to eliminate costly kernel compilation time from the runtime of your application. With OCLTools developers can embed the source code of their kernels (clear text or encrypted) directly into their program binaries eliminating the need to distribute kernel source code in the open while still maintaining the flexibility of runtime compilation. Not only can you embed source code into your OpenCL binaries but you can embed precompiled kernels as well effectively eliminating the additional kernel compilation overhead from the run time of your application.

OCLTools comes with an offline OpenCL compiler (oclcc), ELF file generator (oclelf), encryption tool (oclcrypt), and utility library to help streamline the OpenCL kernel compilation process. "The ClusterChimps Guide to Offline OpenCL Compiling and Linking" not only serves as a reference for the tools but it also walks you step by step through each usecase with example code showing you how it's done.

The ClusterChimps Guide to Offline OpenCL Compiling and Linking
Source Code (2178 downloads)
This tarball contains the source for the OCLTools suite of tools as well as some usage examples
Download tarball

ClusterChimps © 2009