17 #include <hwloc/autogen/config.h>
18 #include <hwloc/helper.h>
19 #ifdef HWLOC_LINUX_SYS
20 #include <hwloc/linux.h>
55 #ifdef HWLOC_LINUX_SYS
57 #define HWLOC_NVML_DEVICE_SYSFS_PATH_MAX 128
58 char path[HWLOC_NVML_DEVICE_SYSFS_PATH_MAX];
68 nvres = nvmlDeviceGetPciInfo(device, &pci);
69 if (NVML_SUCCESS != nvres) {
74 sprintf(path,
"/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus", pci.domain, pci.bus, pci.device);
75 sysfile = fopen(path,
"r");
111 && !strncmp(
"nvml", osdev->
name, 4)
112 && atoi(osdev->
name + 4) == (
int) idx)
143 nvres = nvmlDeviceGetPciInfo(device, &pci);
144 if (NVML_SUCCESS != nvres)
150 if (strncmp(osdev->
name,
"nvml", 4))