|
PAPI 7.1.0.0
|
This is an NVML component, it demos the component interface and implements a number of counters from the Nvidia Management Library. Please refer to NVML documentation for details about nvmlDeviceGetPowerUsage, nvmlDeviceGetTemperature. Power is reported in mW and temperature in Celcius. The counter descriptions should contain the units that the measurement returns. More...

Go to the source code of this file.
Data Structures | |
| struct | nvml_context_t |
Macros | |
| #define | DECLDIR __attribute__((weak)) |
| #define | NVML_MAX_COUNTERS 100 |
| #define | DO_SOME_CHECKING(vectorp) |
Variables | |
| void(* | _dl_non_dynamic_init )(void) |
| nvml_control_state_t | |
| static nvml_native_event_entry_t * | nvml_native_table = NULL |
| static int * | nvml_dev_id_table = NULL |
| static int | device_count = 0 |
| static int | num_events = 0 |
| static nvmlDevice_t * | devices = NULL |
| static int * | features = NULL |
| static unsigned int * | power_management_initial_limit = NULL |
| static unsigned int * | power_management_limit_constraint_min = NULL |
| static unsigned int * | power_management_limit_constraint_max = NULL |
| papi_vector_t | _nvml_vector |
Definition in file linux-nvml.c.
| #define DECLDIR __attribute__((weak)) |
| #define DO_SOME_CHECKING | ( | vectorp | ) |
Definition at line 411 of file linux-nvml.c.
| #define NVML_MAX_COUNTERS 100 |
|
static |
| int _papi_nvml_ctl | ( | hwd_context_t * | ctx, |
| int | code, | ||
| _papi_int_option_t * | option | ||
| ) |
This function sets various options in the component
| code | valid are PAPI_SET_DEFDOM, PAPI_SET_DOMAIN, PAPI_SETDEFGRN, PAPI_SET_GRANUL and PAPI_SET_INHERIT |
Definition at line 1570 of file linux-nvml.c.
Initialize hardware counters, setup the function vector table and get hardware information, this routine is called when the PAPI process is initialized (IE PAPI_library_init)
Definition at line 1105 of file linux-nvml.c.
| int _papi_nvml_init_control_state | ( | hwd_control_state_t * | ctl | ) |
Setup a counter control state. In general a control state holds the hardware info for an EventSet.
Definition at line 1408 of file linux-nvml.c.
|
static |
Definition at line 1125 of file linux-nvml.c.


| int _papi_nvml_init_thread | ( | hwd_context_t * | ctx | ) |
This is called whenever a thread is initialized
Definition at line 583 of file linux-nvml.c.
Takes a native event code and passes back the event description
| EventCode | is the native event code |
| descr | is a pointer for the description to be copied to |
| len | is the size of the descr string |
Definition at line 1701 of file linux-nvml.c.
| int _papi_nvml_ntv_code_to_info | ( | unsigned int | EventCode, |
| PAPI_event_info_t * | info | ||
| ) |
Takes a native event code and passes back the event info
| EventCode | is the native event code |
| info | is a pointer for the info to be copied to |
Definition at line 1718 of file linux-nvml.c.
Takes a native event code and passes back the name
| EventCode | is the native event code |
| name | is a pointer for the name to be copied to |
| len | is the size of the name string |
Definition at line 1678 of file linux-nvml.c.
Enumerate Native Events
| EventCode | is the event of interest |
| modifier | is one of PAPI_ENUM_FIRST, PAPI_ENUM_EVENTS If your component has attribute masks then these need to be handled here as well. |
Definition at line 1635 of file linux-nvml.c.
| int _papi_nvml_read | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl, | ||
| long long ** | events, | ||
| int | flags | ||
| ) |
Triggered by PAPI_read()
Definition at line 1488 of file linux-nvml.c.

| int _papi_nvml_reset | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl | ||
| ) |
Triggered by PAPI_reset() but only if the EventSet is currently running
Definition at line 1540 of file linux-nvml.c.

| int _papi_nvml_set_domain | ( | hwd_control_state_t * | cntrl, |
| int | domain | ||
| ) |
This function has to set the bits needed to count different domains In particular: PAPI_DOM_USER, PAPI_DOM_KERNEL PAPI_DOM_OTHER By default return PAPI_EINVAL if none of those are specified and PAPI_OK with success PAPI_DOM_USER is only user context is counted PAPI_DOM_KERNEL is only the Kernel/OS context is counted PAPI_DOM_OTHER is Exception/transient mode (like user TLB misses) PAPI_DOM_ALL is all of the domains
Definition at line 1594 of file linux-nvml.c.
| int _papi_nvml_shutdown_component | ( | ) |
Definition at line 1076 of file linux-nvml.c.


| int _papi_nvml_shutdown_thread | ( | hwd_context_t * | ctx | ) |
Called at thread shutdown
Definition at line 1555 of file linux-nvml.c.
| int _papi_nvml_start | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl | ||
| ) |
Triggered by PAPI_start()
Definition at line 1447 of file linux-nvml.c.
| int _papi_nvml_stop | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl | ||
| ) |
Triggered by PAPI_stop()
Definition at line 1464 of file linux-nvml.c.

| int _papi_nvml_update_control_state | ( | hwd_control_state_t * | ctl, |
| NativeInfo_t * | native, | ||
| int | count, | ||
| hwd_context_t * | ctx | ||
| ) |
Triggered by eventset operations like add or remove
Definition at line 1420 of file linux-nvml.c.
| int _papi_nvml_write | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl, | ||
| long long * | events | ||
| ) |
Triggered by PAPI_write(), but only if the counters are running
Definition at line 1514 of file linux-nvml.c.

|
static |
Definition at line 751 of file linux-nvml.c.

|
static |
Definition at line 593 of file linux-nvml.c.


Definition at line 153 of file linux-nvml.c.

Definition at line 168 of file linux-nvml.c.

Definition at line 195 of file linux-nvml.c.

Definition at line 209 of file linux-nvml.c.

Definition at line 223 of file linux-nvml.c.

Definition at line 386 of file linux-nvml.c.

Definition at line 318 of file linux-nvml.c.

Definition at line 248 of file linux-nvml.c.

Definition at line 332 of file linux-nvml.c.

Definition at line 346 of file linux-nvml.c.

Definition at line 363 of file linux-nvml.c.

|
static |
Definition at line 1250 of file linux-nvml.c.

Code that reads event values.
Definition at line 450 of file linux-nvml.c.


|
static |
Definition at line 417 of file linux-nvml.c.

Code that reads event values.
Definition at line 532 of file linux-nvml.c.

| void(* _dl_non_dynamic_init) (void) | ( | void | ) |
Holds control flags. Usually there's one of these per event-set. Usually this is out-of band configuration of the hardware
< Copy of counts, holds results when stopped
Definition at line 46 of file linux-nvml.c.
| papi_vector_t _nvml_vector |
Vector that points to entry points for our component
Definition at line 1740 of file linux-nvml.c.
|
static |
Number of devices detected at component_init time
Definition at line 141 of file linux-nvml.c.
|
static |
Definition at line 146 of file linux-nvml.c.
|
static |
Definition at line 147 of file linux-nvml.c.
|
static |
number of events in the table
Definition at line 144 of file linux-nvml.c.
| nvml_control_state_t |
Definition at line 129 of file linux-nvml.c.
|
static |
Definition at line 138 of file linux-nvml.c.
|
static |
This table contains the native events
Definition at line 137 of file linux-nvml.c.
|
static |
Definition at line 148 of file linux-nvml.c.
|
static |
Definition at line 150 of file linux-nvml.c.
|
static |
Definition at line 149 of file linux-nvml.c.