There are runtime versions of opencl being shipped which don't require the development kits.  NVIDIA supports OpenCL in the CUDA driver which shouldn't require installation of development components.  AMD probably does the same.  

If you want to use PyOpenCL to distribute to a customer, they must also have a working PyOpenCL implementation which necessitates that they will have OpenCL drivers.  

You would want to query the platforms and determine whether any are available, and catch exceptions if they can't import.  As for distributing binaries, this is a difficult part because while you can precompile them, you don't know what architectures that are supported so the solution may be to compile on the fly from source or precompiling all of the available possibilities, but this hasn't been fully explored yet. 

If you are deploying to windows based installations then it is much easier. You can create executable python files, hiding your source, which would then interact in defined ways with OpenCL.  

Lastly, for deploying applications it may be better to use C, as they wouldn't have to install PyOpenCL.

You don't need metaprogramming necessarily, just some branching.    

On Sun, Sep 25, 2011 at 5:16 PM, Ziyad Saeed <> wrote:
Everything i have read about OpenCL talks about codes that you run on your own hardware. Essentially for in-house application where you have complete control over the hardware.
How do you deploy a PyOpenCL application to a customer (Single PC) where you don't know what hardware they have?
What does the customer need to have on his/her computer for PyOpenCL based apps to work? like specific drivers?
Can you create a nice binary to deploy?
What happens to the GPU/CPU code if the customer doesn't have a GPU/CPU which is OpenCL compatible? Metaprogramming can be used to detect and adapt

How well with PyOpenCL work on a server where millions of users will be doing computations?
PyOpenCL mailing list

Robert L Cloud
Student, School of Engineering
The University of Alabama at Birmingham