OpenCL programming using Python syntax
School of Computing, DePaul University, Chicago IL 60604, USA
Third International Conference on Computer Science, Engineering & Applications (ICCSEA), 2013
@article{di2013opencl,
title={OpenCL programming using Python syntax},
author={Di Pierro, Massimo},
year={2013}
}
We describe ocl, a Python library built on top of pyOpenCL and numpy. It allows programming GPU devices using Python. Python functions which are marked up using the provided decorator, are converted into C99/OpenCL and compiled using the JIT at runtime. This approach lowers the barrier to entry to programming GPU devices since it requires only Python syntax and no external compilation or linking steps. The resulting Python program runs even if a GPU is not available. As an example of application, we solve the problem of computing the covariance matrix for historical stock prices and determining the optimal portfolio according to Modern Portfolio Theory.
August 26, 2013 by hgpu