64#define DECLDIR __attribute__((weak))
88static char* (*nvmlErrorStringPtr)(nvmlReturn_t);
110static void*
dl3 = NULL;
112static char nvml_main[]=PAPI_NVML_MAIN;
120#define NVML_MAX_COUNTERS 100
125typedef struct nvml_control_state {
132typedef struct nvml_context {
155 unsigned int ret = 0;
157 bad = (*nvmlDeviceGetClockInfoPtr)(dev, which_one, &ret);
159 if (NVML_SUCCESS != bad) {
161 return (
unsigned long long) - 1;
164 return (
unsigned long long)ret;
170 nvmlEccErrorCounts_t counts;
173 bad = (*nvmlDeviceGetDetailedEccErrorsPtr)(dev, bits, NVML_VOLATILE_ECC , &counts);
175 if (NVML_SUCCESS != bad) {
177 return (
unsigned long long) - 1;
181 return counts.registerFile;
183 return counts.l1Cache;
185 return counts.l2Cache;
187 return counts.deviceMemory;
191 return (
unsigned long long) - 1;
197 unsigned int ret = 0;
199 bad = (*nvmlDeviceGetFanSpeedPtr)(dev, &ret);
201 if (NVML_SUCCESS != bad) {
203 return (
unsigned long long) - 1;
205 return (
unsigned long long)ret;
211 unsigned int ret = 0;
213 bad = (*nvmlDeviceGetClockInfoPtr)(dev, which_one, &ret);
215 if (NVML_SUCCESS != bad) {
217 return (
unsigned long long) - 1;
219 return (
unsigned long long) ret;
225 nvmlMemory_t meminfo;
227 bad = (*nvmlDeviceGetMemoryInfoPtr)(dev, &meminfo);
229 if (NVML_SUCCESS != bad) {
231 return (
unsigned long long) - 1;
236 return meminfo.total;
244 return (
unsigned long long) - 1;
250 unsigned int ret = 0;
251 nvmlPstates_t
state = NVML_PSTATE_15;
253 bad = (*nvmlDeviceGetPerformanceStatePtr)(dev, &
state);
255 if (NVML_SUCCESS != bad) {
257 return (
unsigned long long) - 1;
308 case NVML_PSTATE_UNKNOWN:
312 return (
unsigned long long) - 1;
314 return (
unsigned long long)ret;
322 bad = (*nvmlDeviceGetPowerUsagePtr)(dev, &power);
324 if (NVML_SUCCESS != bad) {
326 return (
unsigned long long) - 1;
328 return (
unsigned long long) power;
334 unsigned int ret = 0;
336 bad = (*nvmlDeviceGetTemperaturePtr)(dev, NVML_TEMPERATURE_GPU, &ret);
338 if (NVML_SUCCESS != bad) {
340 return (
unsigned long long) - 1;
342 return (
unsigned long long)ret;
348 unsigned long long counts = 0;
350 bad = (*nvmlDeviceGetTotalEccErrorsPtr)(dev, bits, NVML_VOLATILE_ECC , &counts);
352 if (NVML_SUCCESS != bad) {
354 return (
unsigned long long) - 1;
365 nvmlUtilization_t util;
367 bad = (*nvmlDeviceGetUtilizationRatesPtr)(dev, &util);
369 if (NVML_SUCCESS != bad) {
371 return (
unsigned long long) - 1;
376 return (
unsigned long long) util.gpu;
378 return (
unsigned long long) util.memory;
383 return (
unsigned long long) - 1;
390 rv = (*nvmlDeviceGetPowerManagementLimitPtr)(dev, &limit);
391 if (NVML_SUCCESS != rv) {
393 return (
unsigned long long) 0;
395 return (
unsigned long long) limit;
411#define DO_SOME_CHECKING(vectorp) do { \
412 int err = _nvml_check_n_initialize(vectorp); \
413 if (PAPI_OK != err) return err; \
427 unsigned int templimit = 0;
432 ret = (*nvmlDeviceGetPowerManagementLimitPtr)(
devices[
i], &templimit);
438 if (ret != NVML_SUCCESS)
458 *value = (
long long) - 1;
471 switch (entry->
type) {
523 if (*value == (
long long)(
unsigned long long) - 1)
552 switch (entry->
type) {
554 unsigned int setToPower = (
unsigned int) * value;
587 SUBDBG(
"Enter: ctx: %p\n", ctx);
596 nvmlEnableState_t mode = NVML_FEATURE_DISABLED;
597 nvmlEnableState_t pendingmode = NVML_FEATURE_DISABLED;
603 float ecc_version = 0.0;
607 unsigned int temp = 0;
615 ret = (*nvmlDeviceGetHandleByIndexPtr)(
i, &
devices[
i]);
616 if (NVML_SUCCESS != ret) {
617 SUBDBG(
"nvmlDeviceGetHandleByIndex(%d, &devices[%d]) failed.\n",
i,
i);
622 if (NVML_SUCCESS != ret) {
623 SUBDBG(
"nvmlDeviceGetName failed \n");
624 const char *name_unknown =
"deviceNameUnknown";
625 strncpy(
name, name_unknown, strlen(name_unknown) + 1);
628 ret = (*nvmlDeviceGetInforomVersionPtr)(
devices[
i], NVML_INFOROM_ECC, inforomECC, 16);
629 if (NVML_SUCCESS != ret) {
632 ecc_version = strtof(inforomECC, NULL);
644 ret = (*nvmlDeviceGetEccModePtr)(
devices[
i], &mode, &pendingmode);
645 if (NVML_SUCCESS == ret) {
646 if (NVML_FEATURE_ENABLED == mode) {
647 if (ecc_version >= 2.0) {
651 if (ecc_version >= 1.0) {
657 SUBDBG(
"nvmlDeviceGetEccMode does not appear to be supported. (nvml return code %d)\n", ret);
687 ret = (*nvmlDeviceGetPowerUsagePtr)(
devices[
i], &temp);
688 if (NVML_SUCCESS == ret) {
692 SUBDBG(
"nvmlDeviceGetPowerUsage does not appear to be supported on this card. (nvml return code %d)\n", ret);
704 unsigned int templimit = 0;
705 ret = (*nvmlDeviceGetPowerManagementLimitPtr)(
devices[
i], &templimit);
706 if (ret == NVML_SUCCESS && templimit > 0) {
712 SUBDBG(
"nvmlDeviceGetPowerManagementLimit not appear to be supported on this card. (NVML code %d)\n", ret);
718 unsigned int minLimit = 0, maxLimit = 0;
719 ret = (*nvmlDeviceGetPowerManagementLimitConstraintsPtr)(
devices[
i], &minLimit, &maxLimit);
720 if (ret == NVML_SUCCESS) {
731 SUBDBG(
"Done nvmlDeviceGetPowerManagementLimitConstraintsPtr\n");
742 SUBDBG(
"Device name is too long %s:device%d",
name,
i);
757 int i, nameLen = 0, j, devTableIdx = 0;
771 if (NVML_SUCCESS != ret) {
772 SUBDBG(
"nvmlDeviceGetName failed \n");
773 const char *name_unknown =
"deviceNameUnknown";
774 strncpy(
name, name_unknown, strlen(name_unknown) + 1);
777 nameLen = strlen(
name);
780 int retval = snprintf(sanitized_name,
sizeof(
name),
"%s:device_%d",
name,
i);
782 SUBDBG(
"Device name is too long %s:device%d",
name,
i);
785 sanitized_name[
sizeof(
name) - 1] =
'\0';
787 for (j = 0; j < nameLen; j++)
788 if (
' ' == sanitized_name[j])
789 sanitized_name[j] =
'_';
792 sprintf(entry->
name,
"%s:graphics_clock", sanitized_name);
800 sprintf(entry->
name,
"%s:sm_clock", sanitized_name);
808 sprintf(entry->
name,
"%s:memory_clock", sanitized_name);
818 sprintf(entry->
name,
"%s:l1_single_ecc_errors", sanitized_name);
821 .
bits = NVML_SINGLE_BIT_ECC,
829 sprintf(entry->
name,
"%s:l2_single_ecc_errors", sanitized_name);
832 .
bits = NVML_SINGLE_BIT_ECC,
840 sprintf(entry->
name,
"%s:memory_single_ecc_errors", sanitized_name);
843 .
bits = NVML_SINGLE_BIT_ECC,
851 sprintf(entry->
name,
"%s:regfile_single_ecc_errors", sanitized_name);
854 .
bits = NVML_SINGLE_BIT_ECC,
862 sprintf(entry->
name,
"%s:1l_double_ecc_errors", sanitized_name);
865 .
bits = NVML_DOUBLE_BIT_ECC,
873 sprintf(entry->
name,
"%s:l2_double_ecc_errors", sanitized_name);
876 .
bits = NVML_DOUBLE_BIT_ECC,
884 sprintf(entry->
name,
"%s:memory_double_ecc_errors", sanitized_name);
887 .
bits = NVML_DOUBLE_BIT_ECC,
895 sprintf(entry->
name,
"%s:regfile_double_ecc_errors", sanitized_name);
898 .
bits = NVML_DOUBLE_BIT_ECC,
908 sprintf(entry->
name,
"%s:fan_speed", sanitized_name);
917 sprintf(entry->
name,
"%s:graphics_max_clock", sanitized_name);
925 sprintf(entry->
name,
"%s:sm_max_clock", sanitized_name);
933 sprintf(entry->
name,
"%s:memory_max_clock", sanitized_name);
943 sprintf(entry->
name,
"%s:total_memory", sanitized_name);
951 sprintf(entry->
name,
"%s:unallocated_memory", sanitized_name);
959 sprintf(entry->
name,
"%s:allocated_memory", sanitized_name);
960 strncpy(entry->
description,
"Allocated FB memory (in bytes). Note that the driver/GPU always sets aside a small amount of memory for bookkeeping.",
PAPI_MAX_STR_LEN);
969 sprintf(entry->
name,
"%s:pstate", sanitized_name);
978 sprintf(entry->
name,
"%s:power", sanitized_name);
981 strncpy(entry->
description,
"Power usage reading for the device, in miliwatts. This is the power draw (+/-5 watts) for the entire board: GPU, memory, etc.",
PAPI_MAX_STR_LEN);
989 sprintf(entry->
name,
"%s:temperature", sanitized_name);
998 sprintf(entry->
name,
"%s:total_ecc_errors", sanitized_name);
1001 .
bits = NVML_SINGLE_BIT_ECC,
1006 sprintf(entry->
name,
"%s:total_ecc_errors", sanitized_name);
1009 .
bits = NVML_DOUBLE_BIT_ECC,
1018 sprintf(entry->
name,
"%s:gpu_utilization", sanitized_name);
1019 strncpy(entry->
description,
"Percent of time over the past second during which one or more kernels was executing on the GPU.",
PAPI_MAX_STR_LEN);
1026 sprintf(entry->
name,
"%s:memory_utilization", sanitized_name);
1027 strncpy(entry->
description,
"Percent of time over the past second during which global (device) memory was being read or written.",
PAPI_MAX_STR_LEN);
1036 sprintf(entry->
name,
"%s:power_management_limit", sanitized_name);
1039 strncpy(entry->
description,
"Power draw upper bound limit (in mW) for the device. Writable (with appropriate privileges) on supported Kepler or later.",
PAPI_MAX_STR_LEN - 1);
1047 sprintf(entry->
name,
"%s:power_management_limit_constraint_min", sanitized_name);
1057 sprintf(entry->
name,
"%s:power_management_limit_constraint_max", sanitized_name);
1119 "Not initialized. Access component events to initialize it.");
1129 unsigned int nvml_count = 0;
1137 SUBDBG(
"Dynamic link of CUDA libraries failed, component will be disabled.\n");
1138 SUBDBG(
"See disable reason in papi_component_avail output for more details.\n");
1141 goto nvml_init_private_exit;
1144 ret = (*nvmlInitPtr)();
1145 if (NVML_SUCCESS != ret) {
1149 goto nvml_init_private_exit;
1153 ret = (*nvmlDeviceGetCountPtr)(&nvml_count);
1154 if (NVML_SUCCESS != ret) {
1158 goto nvml_init_private_exit;
1168 "%s failed to alloc %lu bytes for features.", __func__,
sizeof(
int)*
device_count);
1172 goto nvml_init_private_exit;
1179 "%s failed to alloc %lu bytes for features.", __func__, (
sizeof(nvmlDevice_t) *
device_count));
1183 goto nvml_init_private_exit;
1190 "%s failed to alloc %lu bytes for power_management_initial_limit.", __func__, (
sizeof(
unsigned int) *
device_count));
1194 goto nvml_init_private_exit;
1199 "%s failed to alloc %lu bytes for power_management_limit_constraint_min.", __func__, (
sizeof(
unsigned int) *
device_count));
1203 goto nvml_init_private_exit;
1208 "%s failed to alloc %lu bytes for power_management_limit_constraint_max.", __func__, (
sizeof(
unsigned int) *
device_count));
1212 goto nvml_init_private_exit;
1220 goto nvml_init_private_exit;
1234nvml_init_private_exit:
1252 char path_lib[1024];
1261 char *cuda_root = getenv(
"PAPI_CUDA_ROOT");
1267 if (strlen(nvml_main) > 0) {
1268 dl3 = dlopen(nvml_main, RTLD_NOW | RTLD_GLOBAL);
1277 dl3 = dlopen(
"libnvidia-ml.so", RTLD_NOW | RTLD_GLOBAL);
1281 if (
dl3 == NULL && cuda_root != NULL) {
1282 snprintf(path_lib, 1024,
"%s/lib64/libnvidia-ml.so", cuda_root);
1283 dl3 = dlopen(path_lib, RTLD_NOW | RTLD_GLOBAL);
1295 if (dlerror() != NULL) {
1300 if (dlerror() != NULL) {
1305 if (dlerror() != NULL) {
1310 if (dlerror() != NULL) {
1315 if (dlerror() != NULL) {
1320 if (dlerror() != NULL) {
1325 if (dlerror() != NULL) {
1330 if (dlerror() != NULL) {
1335 if (dlerror() != NULL) {
1340 if (dlerror() != NULL) {
1345 if (dlerror() != NULL) {
1350 if (dlerror() != NULL) {
1355 if (dlerror() != NULL) {
1360 if (dlerror() != NULL) {
1365 if (dlerror() != NULL) {
1370 if (dlerror() != NULL) {
1375 if (dlerror() != NULL) {
1380 if (dlerror() != NULL) {
1385 if (dlerror() != NULL) {
1390 if (dlerror() != NULL) {
1395 if (dlerror() != NULL) {
1410 SUBDBG(
"nvml_init_control_state... %p\n", ctl);
1425 SUBDBG(
"Enter: ctl: %p, ctx: %p\n", ctl, ctx);
1437 nvml_ctl->which_counter[
i] = index;
1442 nvml_ctl->num_events =
count;
1449 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1466 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1475 for (
i = 0;
i < nvml_ctl->num_events;
i++) {
1478 nvml_ctl->which_counter[
i])))
1489 long long **
events,
int flags)
1491 SUBDBG(
"Enter: ctx: %p, flags: %d\n", ctx, flags);
1499 for (
i = 0;
i < nvml_ctl->num_events;
i++) {
1502 nvml_ctl->which_counter[
i])))
1507 *
events = nvml_ctl->counter;
1516 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1527 for (
i = 0;
i < nvml_ctl->num_events;
i++) {
1542 SUBDBG(
"Enter: ctx: %p, ctl: %p\n", ctx, ctl);
1557 SUBDBG(
"Enter: ctx: %p\n", ctx);
1572 SUBDBG(
"Enter: ctx: %p, code: %d\n", ctx, code);
1596 SUBDBG(
"Enter: cntrl: %p, domain: %d\n", cntrl, domain);
1603 SUBDBG(
" PAPI_DOM_USER \n");
1607 SUBDBG(
" PAPI_DOM_KERNEL \n");
1611 SUBDBG(
" PAPI_DOM_OTHER \n");
1615 SUBDBG(
" PAPI_DOM_ALL \n");
1658 *EventCode = *EventCode + 1;
1680 SUBDBG(
"Entry: EventCode: %#x, name: %s, len: %d\n", EventCode,
name, len);
1721 int index = EventCode;
1746 .short_name =
"nvml",
1748 .description =
"NVML provides the API for monitoring NVIDIA hardware (power usage, temperature, fan speed, etc)",
1749 .support_version =
"n/a",
1750 .kernel_version =
"n/a",
1752 .num_preset_events = 0,
1753 .num_native_events = 0,
1763 .posix1b_timers = 0,
1764 .kernel_profile = 0,
1765 .kernel_multiplex = 0,
1766 .fast_counter_read = 0,
1767 .fast_real_timer = 0,
1768 .fast_virtual_timer = 0,
1770 .attach_must_ptrace = 0,
1801 .cleanup_eventset = NULL,
1803 .allocate_registers = NULL,
1806 .dispatch_timer = NULL,
1807 .get_overflow_address = NULL,
1808 .stop_profiling = NULL,
1809 .set_overflow = NULL,
1810 .set_profile = NULL,
1814 .ntv_name_to_code = NULL,
static papi_handle_t handle
const char * names[NUM_EVENTS]
nvmlReturn_t DECLDIR nvmlDeviceGetPowerUsage(nvmlDevice_t device, unsigned int *dest)
nvmlReturn_t(* nvmlDeviceGetCountPtr)(unsigned int *dest)
nvmlReturn_t(* nvmlShutdownPtr)(void)
nvmlReturn_t(* nvmlDeviceGetMemoryInfoPtr)(nvmlDevice_t, nvmlMemory_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetTotalEccErrors(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, unsigned long long *)
nvmlReturn_t(* nvmlDeviceGetEccModePtr)(nvmlDevice_t, nvmlEnableState_t *, nvmlEnableState_t *)
const char *DECLDIR nvmlErrorString(nvmlReturn_t)
nvmlReturn_t DECLDIR nvmlDeviceGetInforomVersion(nvmlDevice_t, nvmlInforomObject_t, char *, unsigned int)
nvmlReturn_t(* nvmlInitPtr)(void)
nvmlReturn_t(* nvmlDeviceGetTotalEccErrorsPtr)(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, unsigned long long *)
nvmlReturn_t DECLDIR nvmlDeviceGetHandleByIndex(unsigned int idx, nvmlDevice_t *dest)
nvmlReturn_t(* nvmlDeviceGetNamePtr)(nvmlDevice_t, char *, unsigned int)
nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementLimitConstraints(nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit)
nvmlReturn_t DECLDIR nvmlDeviceGetClockInfo(nvmlDevice_t, nvmlClockType_t, unsigned int *)
nvmlReturn_t DECLDIR nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int len)
nvmlReturn_t(* nvmlDeviceGetUtilizationRatesPtr)(nvmlDevice_t, nvmlUtilization_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t, unsigned int *)
nvmlReturn_t(* nvmlDeviceGetFanSpeedPtr)(nvmlDevice_t, unsigned int *)
nvmlReturn_t DECLDIR nvmlDeviceGetPerformanceState(nvmlDevice_t, nvmlPstates_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t, nvmlMemory_t *)
nvmlReturn_t(* nvmlDeviceGetClockInfoPtr)(nvmlDevice_t, nvmlClockType_t, unsigned int *)
char *(* nvmlErrorStringPtr)(nvmlReturn_t)
nvmlReturn_t(* nvmlDeviceGetPowerUsagePtr)(nvmlDevice_t, unsigned int *)
nvmlReturn_t(* nvmlDeviceGetPciInfoPtr)(nvmlDevice_t, nvmlPciInfo_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetPciInfo(nvmlDevice_t, nvmlPciInfo_t *)
nvmlReturn_t(* nvmlDeviceGetHandleByIndexPtr)(unsigned int, nvmlDevice_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetUtilizationRates(nvmlDevice_t, nvmlUtilization_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetCount(unsigned int *dest)
nvmlReturn_t(* nvmlDeviceSetPowerManagementLimitPtr)(nvmlDevice_t device, unsigned int limit)
nvmlReturn_t DECLDIR nvmlShutdown(void)
nvmlReturn_t DECLDIR nvmlDeviceGetDetailedEccErrors(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, nvmlEccErrorCounts_t *)
nvmlReturn_t DECLDIR nvmlDeviceSetPowerManagementLimit(nvmlDevice_t device, unsigned int limit)
nvmlReturn_t(* nvmlDeviceGetInforomVersionPtr)(nvmlDevice_t, nvmlInforomObject_t, char *, unsigned int)
nvmlReturn_t(* nvmlDeviceGetPerformanceStatePtr)(nvmlDevice_t, nvmlPstates_t *)
nvmlReturn_t DECLDIR nvmlDeviceGetEccMode(nvmlDevice_t, nvmlEnableState_t *, nvmlEnableState_t *)
nvmlReturn_t(* nvmlDeviceGetPowerManagementLimitPtr)(nvmlDevice_t device, unsigned int *limit)
nvmlReturn_t(* nvmlDeviceGetDetailedEccErrorsPtr)(nvmlDevice_t, nvmlEccBitType_t, nvmlEccCounterType_t, nvmlEccErrorCounts_t *)
nvmlReturn_t(* nvmlDeviceGetTemperaturePtr)(nvmlDevice_t, nvmlTemperatureSensors_t, unsigned int *)
nvmlReturn_t DECLDIR nvmlInit(void)
nvmlReturn_t(* nvmlDeviceGetPowerManagementLimitConstraintsPtr)(nvmlDevice_t device, unsigned int *minLimit, unsigned int *maxLimit)
nvmlReturn_t DECLDIR nvmlDeviceGetPowerManagementLimit(nvmlDevice_t device, unsigned int *limit)
nvmlReturn_t DECLDIR nvmlDeviceGetTemperature(nvmlDevice_t, nvmlTemperatureSensors_t, unsigned int *)
Lock one of two mutex variables defined in papi.h.
Unlock one of the mutex variables defined in papi.h.
char events[MAX_EVENTS][BUFSIZ]
static int nvml_hardware_write(long long *value, int which_one)
static int _papi_nvml_init_component(int cidx)
static int * nvml_dev_id_table
papi_vector_t _nvml_vector
unsigned long long getMemoryInfo(nvmlDevice_t dev, int which_one)
#define DO_SOME_CHECKING(vectorp)
static int detectDevices()
int _papi_nvml_ntv_code_to_name(unsigned int EventCode, char *name, int len)
unsigned long long getFanSpeed(nvmlDevice_t dev)
unsigned long long getPowerManagementLimit(nvmlDevice_t dev)
int _papi_nvml_reset(hwd_context_t *ctx, hwd_control_state_t *ctl)
int _papi_nvml_set_domain(hwd_control_state_t *cntrl, int domain)
unsigned long long getUtilization(nvmlDevice_t dev, int which_one)
unsigned long long getClockSpeed(nvmlDevice_t dev, nvmlClockType_t which_one)
int _papi_nvml_init_thread(hwd_context_t *ctx)
int _papi_nvml_shutdown_component()
int _papi_nvml_ctl(hwd_context_t *ctx, int code, _papi_int_option_t *option)
int _papi_nvml_shutdown_thread(hwd_context_t *ctx)
unsigned long long getEccLocalErrors(nvmlDevice_t dev, nvmlEccBitType_t bits, int which_one)
static unsigned int * power_management_initial_limit
unsigned long long getTemperature(nvmlDevice_t dev)
static nvml_native_event_entry_t * nvml_native_table
static nvmlDevice_t * devices
static int nvml_hardware_read(long long *value, int which_one)
#define NVML_MAX_COUNTERS
unsigned long long getPowerUsage(nvmlDevice_t dev)
int _papi_nvml_read(hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags)
static void nvml_hardware_reset()
int _papi_nvml_ntv_code_to_info(unsigned int EventCode, PAPI_event_info_t *info)
unsigned long long getMaxClockSpeed(nvmlDevice_t dev, nvmlClockType_t which_one)
int _papi_nvml_write(hwd_context_t *ctx, hwd_control_state_t *ctl, long long *events)
unsigned long long getPState(nvmlDevice_t dev)
int _papi_nvml_start(hwd_context_t *ctx, hwd_control_state_t *ctl)
static int _papi_nvml_init_private(void)
int _papi_nvml_stop(hwd_context_t *ctx, hwd_control_state_t *ctl)
static int linkCudaLibraries()
void(* _dl_non_dynamic_init)(void)
static unsigned int * power_management_limit_constraint_min
static void createNativeEvents()
static int _nvml_check_n_initialize(papi_vector_t *vector)
unsigned long long getTotalEccErrors(nvmlDevice_t dev, nvmlEccBitType_t bits)
int _papi_nvml_ntv_code_to_descr(unsigned int EventCode, char *descr, int len)
static unsigned int * power_management_limit_constraint_max
int _papi_nvml_update_control_state(hwd_control_state_t *ctl, NativeInfo_t *native, int count, hwd_context_t *ctx)
int _papi_nvml_ntv_enum_events(unsigned int *EventCode, int modifier)
int _papi_nvml_init_control_state(hwd_control_state_t *ctl)
#define MEMINFO_TOTAL_MEMORY
#define FEATURE_CLOCK_INFO
#define HAS_FEATURE(features, query)
#define MEMINFO_UNALLOCED
#define FEATURE_UTILIZATION
#define FEATURE_NVML_POWER_MANAGEMENT_LIMIT_CONSTRAINT_MAX
#define FEATURE_ECC_TOTAL_ERRORS
#define FEATURE_FAN_SPEED
#define FEATURE_MAX_CLOCK
#define FEATURE_NVML_POWER_MANAGEMENT_LIMIT_CONSTRAINT_MIN
#define MEMORY_UTILIZATION
#define FEATURE_ECC_LOCAL_ERRORS
#define FEATURE_MEMORY_INFO
#define LOCAL_ECC_REGFILE
#define FEATURE_PERF_STATES
#define FEATURE_POWER_MANAGEMENT
unsigned long AO_t __attribute__((__aligned__(4)))
Return codes and api definitions.
#define SUBDBG(format, args...)
char name[PAPI_MAX_STR_LEN]
char disabled_reason[PAPI_HUGE_STR_LEN]
char units[PAPI_MIN_STR_LEN]
char symbol[PAPI_HUGE_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]
nvml_control_state_t state
char units[PAPI_MIN_STR_LEN]
char description[PAPI_MAX_STR_LEN]
nvml_resource_options_t options
char name[PAPI_MAX_STR_LEN]
PAPI_component_info_t cmp_info
struct local_ecc ecc_opts