I finally merged the new memory model in master (mainly for properly
supporting KNL-like heterogeneous memory). This was the main and last
big change for hwloc 2.0. I still need to fix some caveats (and lstopo
needs to better display NUMA nodes) but that part of the API should be

Now we encourage people to start porting their code to the new hwloc 2.0
API. Here's a guide that should answer most questions about the upgrade:

The final 2.0 release isn't planned before at least the end of november,
but we need to fix API issues before releasing it. So please start
testing it and report issues, missing docs, etc. If there's any existing
function/feature (either new or old) that needs to be changed, please
report it too. We're only breaking the ABI once for 2.0, we cannot break
it again 2 months later.

Tarballs of git master are already available from
and in nightly snapshots on the website starting tomorrow.

There are still a couple things that may or may not change before the
final 2.0 API. If you have an opinion, please let us know.
* (likely) Make all depths *signed* ints: some objects have a negative
depth (meaning "special depth", not a normal depth in the main tree).
You'll have to cast to (int) whenever you printf a depth while
supporting both hwloc 1.x and 2.x.
* (likely) Drop obj->allowed_cpuset (and allowed_nodeset) and just keep
one for the entire topology: It is very rarely used (only when you set
HWLOC_TOPOLOGY_FLAG_WHOLESYSTEM) and can be emulated by doing a binary
"and" or "intersects" between obj->cpuset and topology->allowed_cpuset.
* (likely) obj->memory becomes obj->attr->numanode since it's only used
for numa nodes. But obj->total_memory should remain in obj because it's
available in all objects (accumulated memory in all children).
* (likely) Remove HWLOC_OBJ_SYSTEM: not used anymore (we don't support
multinode topologies anymore). The root is always MACHINE now. I guess
we'd #define SYSTEM MACHINE so that you don't have to change your code.
* (unlikely) rename some info objects for consistency (examples below).
  + GPUVendor and PCIVendor and CPUVendor -> Vendor.
  + GPUModel and PCIDevice and CPUModel -> Model
  + NVIDIASerial and MICSerialNumber -> SerialNumber
But that will make your life harder for looking up attributes while
supporting hwloc 1.x and 2.x. And XML import from 1.x would be more
expensive since we'd have to rename these.
* (unlikely) Share information between osdev (e.g. eth0 or cuda0) and
pcidev: Lots of attributes are identical (Vendor, Model, kind of device
etc). We could merge those objects into a single generic "I/O object".
However a single PCI device can contain multiple OS devices (for
instance "mlx5_0"+"ib0", or "cuda0"+"opencl0d0", etc).


hwloc-devel mailing list

Reply via email to