Jean-Matthieu Etancelin <Jean-Matthieu.Etancelin(a)imag.fr> writes:
The following questions are related to an hybrid programming on multi-devices machine : 2
multi-core CPUs with 2 GPUs, MPI on CPUs and OpenCL on GPUs. The 2 GPUs are identical
Nvidia k20m and both GPU are present in platform’s devices list.
- From the host side, is there a way to differentiate these GPUs (all
informations from ‘device_info’ are identical) ? Is pyOpenCL able to
get some PCIe bus id informations, as in pyCUDA, for example ?
OpenCL does not expose PCI IDs, as (understandably) not all compute
devices everywhere are on a PCI bus.
- An easy way to differentiate these GPUs is the list of devices
returned by ‘platform.get_devices’, how this list is built (ordered
list, is the list across the host processus are equivalent and have
the same order, …) ?
In all implementations I've seen, the list of devices within each
platform is stably ordered (i.e. doesn't vary from one process to the
next as long as they run on the same computer). That's not really a
guarantee though. PyOpenCL just exposes the ordering offered up by
OpenCL. It doesn't add (or remove) any functionality there.