Refine OpenCL infrastructure & add Python bindings.