6 #ifndef DCGMDEVICEPOOLIMP_HPP_INCLUDE
7 #define DCGMDEVICEPOOLIMP_HPP_INCLUDE
11 #include "dcgm_agent.h"
12 #include "dcgm_structs.h"
25 virtual double sample(
int gpu_idx,
int field_id)
const override;
26 virtual void update(
int gpu_idx)
override;
27 virtual void update_rate(
int field_update_rate)
override;
34 virtual void check_result(
const dcgmReturn_t result,
const std::string error,
const int line);
36 long long m_update_freq;
37 double m_max_keep_age;
38 int m_max_keep_sample;
42 dcgmHandle_t m_dcgm_handle;
43 dcgmFieldGrp_t m_field_group_id;
48 std::vector<std::vector<dcgmFieldValue_v1>> m_dcgm_field_values;
Definition: DCGMDevicePool.hpp:17
@ M_NUM_FIELD_ID
Number of valid field ids.
Definition: DCGMDevicePool.hpp:35
Definition: DCGMDevicePoolImp.hpp:19
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....
Definition: DCGMDevicePool.cpp:110
virtual int num_device() const override
Number of GPUs that support DCGM on the platform.
Definition: DCGMDevicePool.cpp:95
virtual void polling_disable(void) override
Disable DCGM data polling through calling unwatchfields.
Definition: DCGMDevicePool.cpp:162
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 wi...
Definition: DCGMDevicePool.cpp:135
DCGMDevicePoolImp()
Definition: DCGMDevicePool.cpp:24
virtual void polling_enable(void) override
Enable DCGM data polling through setting the watch fields.
Definition: DCGMDevicePool.cpp:141
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.
Definition: DCGMDevicePool.cpp:129
virtual double sample(int gpu_idx, int field_id) const override
Get the value for the provided geopm_field_id.
Definition: DCGMDevicePool.cpp:100
virtual ~DCGMDevicePoolImp()
Definition: DCGMDevicePool.cpp:79
virtual void update_rate(int field_update_rate) override
Set field update rate for DCGM devices. This is the rate.
Definition: DCGMDevicePool.cpp:123