#include <stdio.h>
#include <stdlib.h>
#include "CUDAWrapNVML.h"
#include "cuda_runtime.h"
#include <dlfcn.h>
Go to the source code of this file.
A trivial little dlopen()-based wrapper library for the NVIDIA NVML library, to allow runtime discovery of NVML on an arbitrary system. This is all very hackish and simple-minded, but it serves my immediate needs in the short term until NVIDIA provides a static NVML wrapper library themselves, hopefully in CUDA 6.5 or maybe sometime shortly after.
Definition in file CUDAWrapNVML.cu.
[static]
Definition at line 50 of file CUDAWrapNVML.cu.
Referenced by wrap_nvml_create, and wrap_nvml_destroy.
[static]
[static]
Definition at line 59 of file CUDAWrapNVML.cu.
References wrap_nvmlPciInfo_t::bus, wrap_nvml_handle::cuda_gpucount, wrap_nvml_handle::cuda_nvml_device_id, wrap_nvmlPciInfo_t::device, wrap_nvml_handle::devs, wrap_nvmlPciInfo_t::domain, NULL, wrap_nvml_handle::nvml_cuda_device_id, wrap_nvml_handle::nvml_dll, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvml_pci_bus_id, wrap_nvml_handle::nvml_pci_device_id, wrap_nvml_handle::nvml_pci_domain_id, wrap_nvml_handle::nvmlDeviceGetCount, wrap_nvml_handle::nvmlDeviceGetCpuAffinity, wrap_nvml_handle::nvmlDeviceGetFanSpeed, wrap_nvml_handle::nvmlDeviceGetHandleByIndex, wrap_nvml_handle::nvmlDeviceGetName, wrap_nvml_handle::nvmlDeviceGetPciInfo, wrap_nvml_handle::nvmlDeviceGetPowerUsage, wrap_nvml_handle::nvmlDeviceGetTemperature, wrap_nvml_handle::nvmlDeviceSetCpuAffinity, wrap_nvml_handle::nvmlInit, wrap_nvml_handle::nvmlShutdown, wrap_dlclose, wrap_dlopen, wrap_dlsym, wrap_nvmlDevice_t, and wrap_nvmlReturn_t.
Referenced by CUDAAccel::CUDAAccel.
Definition at line 235 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, NULL, wrap_nvml_handle::nvml_cuda_device_id, wrap_nvml_handle::nvml_dll, wrap_nvml_handle::nvml_pci_bus_id, wrap_nvml_handle::nvml_pci_device_id, wrap_nvml_handle::nvml_pci_domain_id, wrap_nvml_handle::nvmlShutdown, and wrap_dlclose.
Definition at line 333 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetCpuAffinity, and WRAPNVML_SUCCESS.
Definition at line 303 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetFanSpeed, wrap_nvmlReturn_t, and WRAPNVML_SUCCESS.
Definition at line 272 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetName, and WRAPNVML_SUCCESS.
Definition at line 319 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetPowerUsage, and WRAPNVML_SUCCESS.
Definition at line 287 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceGetTemperature, wrap_nvmlReturn_t, and WRAPNVML_SUCCESS.
Definition at line 348 of file CUDAWrapNVML.cu.
References wrap_nvml_handle::cuda_nvml_device_id, wrap_nvml_handle::devs, wrap_nvml_handle::nvml_gpucount, wrap_nvml_handle::nvmlDeviceSetCpuAffinity, and WRAPNVML_SUCCESS.