geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
Public Types | Public Member Functions | List of all members
geopm::DCGMDevicePool Class Referenceabstract

#include <DCGMDevicePool.hpp>

Inheritance diagram for geopm::DCGMDevicePool:
Inheritance graph
[legend]

Public Types

enum  m_field_id_e { M_FIELD_ID_SM_ACTIVE , M_FIELD_ID_SM_OCCUPANCY , M_FIELD_ID_DRAM_ACTIVE , M_NUM_FIELD_ID }
 

Public Member Functions

 DCGMDevicePool ()=default
 
virtual ~DCGMDevicePool ()=default
 
virtual int num_device () const =0
 Number of GPUs that support DCGM on the platform. More...
 
virtual double sample (int gpu_idx, int field_id) const =0
 Get the value for the provided geopm_field_id. More...
 
virtual void update (int gpu_idx)=0
 Query DCGM for the latest value for an GPU. Note that this is the last value DCGM cached. This updates the DCGM device pool stored value that is provided via the sample_field_value function. More...
 
virtual void update_rate (int field_update_rate)=0
 Set field update rate for DCGM devices. This is the rate. More...
 
virtual void max_storage_time (int max_storage_time)=0
 Set maximum storage time for for DCGM devices. This is the maximum time a DCGM sample will be kept. More...
 
virtual void max_samples (int max_samples)=0
 Set maximum samples to store for for DCGM devices. This is the maximum number of DCGM samples that will be kept. 0 indicates no limit. More...
 
virtual void polling_enable (void)=0
 Enable DCGM data polling through setting the watch fields. More...
 
virtual void polling_disable (void)=0
 Disable DCGM data polling through calling unwatchfields. More...
 

Detailed Description

An interface for the NVIDIA Data Center GPU Manager (DCGM). This class is a wrapper around all calls to the DCGM library and is intended to be called via the DCGMIOGroup. Its primary function is provided an abstracted interface to DCGM metrics of interest.

Member Enumeration Documentation

◆ m_field_id_e

Enumerator
M_FIELD_ID_SM_ACTIVE 

Field ID associated with DCGM SM Active metrics.

M_FIELD_ID_SM_OCCUPANCY 

Field ID associated with SM Occupancy metrics.

M_FIELD_ID_DRAM_ACTIVE 

Field ID associated with DCGM DRAM Active metrics.

M_NUM_FIELD_ID 

Number of valid field ids.

Constructor & Destructor Documentation

◆ DCGMDevicePool()

geopm::DCGMDevicePool::DCGMDevicePool ( )
default

◆ ~DCGMDevicePool()

virtual geopm::DCGMDevicePool::~DCGMDevicePool ( )
virtualdefault

Member Function Documentation

◆ max_samples()

virtual void geopm::DCGMDevicePool::max_samples ( int  max_samples)
pure virtual

Set maximum samples to store for for DCGM devices. This is the maximum number of DCGM samples that will be kept. 0 indicates no limit.

Parameters
[in]max_samplesmaximum number of samples to store

Implemented in geopm::DCGMDevicePoolImp.

◆ max_storage_time()

virtual void geopm::DCGMDevicePool::max_storage_time ( int  max_storage_time)
pure virtual

Set maximum storage time for for DCGM devices. This is the maximum time a DCGM sample will be kept.

Parameters
[in]max_storage_timemaximum storage time in seconds

Implemented in geopm::DCGMDevicePoolImp.

◆ num_device()

virtual int geopm::DCGMDevicePool::num_device ( ) const
pure virtual

Number of GPUs that support DCGM on the platform.

Returns
Number of GPUs supported by DCGM.

Implemented in geopm::DCGMDevicePoolImp.

◆ polling_disable()

virtual void geopm::DCGMDevicePool::polling_disable ( void  )
pure virtual

Disable DCGM data polling through calling unwatchfields.

Implemented in geopm::DCGMDevicePoolImp.

◆ polling_enable()

virtual void geopm::DCGMDevicePool::polling_enable ( void  )
pure virtual

Enable DCGM data polling through setting the watch fields.

Implemented in geopm::DCGMDevicePoolImp.

◆ sample()

virtual double geopm::DCGMDevicePool::sample ( int  gpu_idx,
int  field_id 
) const
pure virtual

Get the value for the provided geopm_field_id.

This value should not change unless update_field_value has been called

Parameters
[in]gpu_idxThe index indicating a particular GPU.
[in]field_idOne of the m_field_id_e values
Returns
The value for the specified field

Implemented in geopm::DCGMDevicePoolImp.

◆ update()

virtual void geopm::DCGMDevicePool::update ( int  gpu_idx)
pure virtual

Query DCGM for the latest value for an GPU. Note that this is the last value DCGM cached. This updates the DCGM device pool stored value that is provided via the sample_field_value function.

Parameters
[in]gpu_idxThe index indicating a particular GPU.

Implemented in geopm::DCGMDevicePoolImp.

◆ update_rate()

virtual void geopm::DCGMDevicePool::update_rate ( int  field_update_rate)
pure virtual

Set field update rate for DCGM devices. This is the rate.

Parameters
[in]field_update_rateDCGM update rate in microseconds.

Implemented in geopm::DCGMDevicePoolImp.


The documentation for this class was generated from the following file: