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

#include <DCGMDevicePoolImp.hpp>

Inheritance diagram for geopm::DCGMDevicePoolImp:
Inheritance graph
[legend]
Collaboration diagram for geopm::DCGMDevicePoolImp:
Collaboration graph
[legend]

Public Member Functions

 DCGMDevicePoolImp ()
 
virtual ~DCGMDevicePoolImp ()
 
virtual int num_device () const override
 Number of GPUs that support DCGM on the platform. More...
 
virtual double sample (int gpu_idx, int field_id) const override
 Get the value for the provided geopm_field_id. More...
 
virtual void update (int gpu_idx) override
 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) override
 Set field update rate for DCGM devices. This is the rate. More...
 
virtual void max_storage_time (int max_storage_time) override
 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) override
 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) override
 Enable DCGM data polling through setting the watch fields. More...
 
virtual void polling_disable (void) override
 Disable DCGM data polling through calling unwatchfields. More...
 
- Public Member Functions inherited from geopm::DCGMDevicePool
 DCGMDevicePool ()=default
 
virtual ~DCGMDevicePool ()=default
 

Additional Inherited Members

- Public Types inherited from geopm::DCGMDevicePool
enum  m_field_id_e { M_FIELD_ID_SM_ACTIVE , M_FIELD_ID_SM_OCCUPANCY , M_FIELD_ID_DRAM_ACTIVE , M_NUM_FIELD_ID }
 

Constructor & Destructor Documentation

◆ DCGMDevicePoolImp()

geopm::DCGMDevicePoolImp::DCGMDevicePoolImp ( )

◆ ~DCGMDevicePoolImp()

geopm::DCGMDevicePoolImp::~DCGMDevicePoolImp ( )
virtual

Member Function Documentation

◆ max_samples()

void geopm::DCGMDevicePoolImp::max_samples ( int  max_samples)
overridevirtual

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

Implements geopm::DCGMDevicePool.

◆ max_storage_time()

void geopm::DCGMDevicePoolImp::max_storage_time ( int  max_storage_time)
overridevirtual

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

Implements geopm::DCGMDevicePool.

◆ num_device()

int geopm::DCGMDevicePoolImp::num_device ( ) const
overridevirtual

Number of GPUs that support DCGM on the platform.

Returns
Number of GPUs supported by DCGM.

Implements geopm::DCGMDevicePool.

◆ polling_disable()

void geopm::DCGMDevicePoolImp::polling_disable ( void  )
overridevirtual

Disable DCGM data polling through calling unwatchfields.

Implements geopm::DCGMDevicePool.

◆ polling_enable()

void geopm::DCGMDevicePoolImp::polling_enable ( void  )
overridevirtual

Enable DCGM data polling through setting the watch fields.

Implements geopm::DCGMDevicePool.

◆ sample()

double geopm::DCGMDevicePoolImp::sample ( int  gpu_idx,
int  field_id 
) const
overridevirtual

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

Implements geopm::DCGMDevicePool.

◆ update()

void geopm::DCGMDevicePoolImp::update ( int  gpu_idx)
overridevirtual

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.

Implements geopm::DCGMDevicePool.

◆ update_rate()

void geopm::DCGMDevicePoolImp::update_rate ( int  field_update_rate)
overridevirtual

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

Parameters
[in]field_update_rateDCGM update rate in microseconds.

Implements geopm::DCGMDevicePool.


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