Converts Python functions to OpenCL kernels