|
16 #ifndef HWLOC_CUDART_H
17 #define HWLOC_CUDART_H
20 #include <hwloc/autogen/config.h>
21 #include <hwloc/linux.h>
23 #include <cuda_runtime_api.h>
47 #ifdef HWLOC_LINUX_SYS
49 #define HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX 128
51 struct cudaDeviceProp prop;
52 char path[HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX];
56 cerr = cudaGetDeviceProperties(&prop, device);
62 #if CUDART_VERSION >= 4000
63 pciDomainID = prop.pciDomainID;
66 sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus", pciDomainID, prop.pciBusID, prop.pciDeviceID);
67 sysfile = fopen(path, "r");
|
|
|