OpenCL

A platform is a programming API used to access devices (GPUs/CPUs). For instance, one can have Intel, nVidia, or AMD APP platform.

$ python -c $'import pyopencl as cl\nfor p in cl.get_platforms(): print p'
<pyopencl.Platform 'AMD Accelerated Parallel Processing' at 0x7f0d93e62120>

A platform contains multiple devices. For example on a computer with an ATI card, Radeon is a device and should be in the output c.get_platforms()[0].get_devices(), along with the CPU.

$ python -c $'import pyopencl as cl\nfor p in cl.get_platforms()[0].get_devices(): print p'
<pyopencl.Device 'Intel(R) Core(TM) i7 CPU       Q 720  @ 1.60GHz' on 'AMD Accelerated Parallel Processing' at 0x22fa870>

Tags: programming

Edit this page
Wiki-logo