6 #ifndef DCGMDEVICEPOOL_HPP_INCLUDE
7 #define DCGMDEVICEPOOL_HPP_INCLUDE
55 virtual double sample(
int gpu_idx,
int field_id)
const = 0;
63 virtual void update(
int gpu_idx) = 0;
Definition: DCGMDevicePool.hpp:17
virtual ~DCGMDevicePool()=default
virtual double sample(int gpu_idx, int field_id) const =0
Get the value for the provided geopm_field_id.
m_field_id_e
Definition: DCGMDevicePool.hpp:19
@ M_FIELD_ID_DRAM_ACTIVE
Field ID associated with DCGM DRAM Active metrics.
Definition: DCGMDevicePool.hpp:31
@ M_FIELD_ID_SM_ACTIVE
Field ID associated with DCGM SM Active metrics.
Definition: DCGMDevicePool.hpp:23
@ M_FIELD_ID_SM_OCCUPANCY
Field ID associated with SM Occupancy metrics.
Definition: DCGMDevicePool.hpp:27
@ M_NUM_FIELD_ID
Number of valid field ids.
Definition: DCGMDevicePool.hpp:35
virtual void polling_enable(void)=0
Enable DCGM data polling through setting the watch fields.
virtual int num_device() const =0
Number of GPUs that support DCGM on the platform.
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.
virtual void polling_disable(void)=0
Disable DCGM data polling through calling unwatchfields.
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....
virtual void update_rate(int field_update_rate)=0
Set field update rate for DCGM devices. This is the rate.
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 wi...
DCGMDevicePool & dcgm_device_pool()
Definition: DCGMDevicePool.cpp:18