Excellent! I think decoupling the device from the screen or display is
probably a good idea (even to my visualization domain work). When it comes
to looking up particular architectural features (say, the SM capability of
Tesla vs. Kepler), we can always fall back to a lookup table based upon
I'll try it out this weekend.
[mailto:hwloc-users-bounces_at_[hidden]] On Behalf Of Brice Goglin
Sent: Friday, February 01, 2013 6:58 AM
To: Stefan Eilemann
Cc: Hardware locality user list
Subject: Re: [hwloc-users] OpenGL GPU detection code
I just committed big changes to the display branch (and I also merged latest
lstopo will now report things like this:
GPU L#0 ":0.0"
GPU L#1 "cuda0"
GPU L#2 "nvml0"
The changes include:
1) We don't have a "display" specific OS device anymore, it's just another
kind of GPU among cuda, opencl and nvml. The name is the X server display
name. There are string attributes in these new GL GPU OS devices (lstopo
GPU L#9 (Backend=GL GPUVendor="NVIDIA Corporation" GPUModel="Tesla
2) The gl component is now buildable as a plugin
3) Given (2), we can't expose internal GL routines in the public API. So
hwloc/gl.h is just made of inline helpers as any other hwloc/foo.h. It now
contains functions to convert between displays (name or port/device) and
hwloc OS devices:
topology, unsigned port, unsigned device) hwloc_obj_t
topology, const char *name)
int hwloc_gl_get_display_by_osdev(hwloc_topology_t topology, hwloc_obj_t
osdev,unsigned *port, unsigned *device)
If you really need the PCI device, just use osdev->parent as documented.
If you need the locality, use hwloc_get_non_io_ancestor(topology,
See tests/gl.c for examples.
Please review hwloc/gl.h and let me know if that works for you. I hope I
used the words port/device/server/screen as expected.
The last thing on my TODO list is to decide is whether we keep the "GL"
name or switch to something among display/X11/X/... for filenames and
hwloc-users mailing list