geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | List of all members
geopm::NVMLDevicePool Class Referenceabstract

#include <NVMLDevicePool.hpp>

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

Public Member Functions

 NVMLDevicePool ()=default
 
virtual ~NVMLDevicePool ()=default
 
virtual int num_gpu (void) const =0
 Number of GPUs on the platform. More...
 
virtual std::unique_ptr< cpu_set_t, std::function< void(cpu_set_t *)> > cpu_affinity_ideal_mask (int gpu_idx) const =0
 CPU Affinitization mask for a particular GPU. More...
 
virtual uint64_t frequency_status_sm (int gpu_idx) const =0
 Get the NVML device streaming multiprocessor frequency in MHz. More...
 
virtual std::vector< unsigned int > frequency_supported_sm (int gpu_idx) const =0
 Get the supported NVML device streaming multiprocessor frequencies in MHz. More...
 
virtual uint64_t utilization (int gpu_idx) const =0
 Get the NVML device utilization metric. More...
 
virtual uint64_t power (int gpu_idx) const =0
 Get the NVML device power in milliwatts. More...
 
virtual uint64_t power_limit (int gpu_idx) const =0
 Get the NVML device power limit in milliwatts. More...
 
virtual uint64_t frequency_status_mem (int gpu_idx) const =0
 Get the NVML device memory subsystem frequency in MHz. More...
 
virtual uint64_t throttle_reasons (int gpu_idx) const =0
 Get the current NVML device clock throttle reasons. More...
 
virtual uint64_t temperature (int gpu_idx) const =0
 Get the current NVML device temperature. More...
 
virtual uint64_t energy (int gpu_idx) const =0
 Get the total energy consumed counter value for an NVML device in millijoules. More...
 
virtual uint64_t performance_state (int gpu_idx) const =0
 Get the current performance state of an NVML device. More...
 
virtual uint64_t throughput_rx_pcie (int gpu_idx) const =0
 Get the pcie receive throughput over a 20ms period for an NVML device. More...
 
virtual uint64_t throughput_tx_pcie (int gpu_idx) const =0
 Get the pcie transmit throughput over a 20ms period for an NVML device. More...
 
virtual uint64_t utilization_mem (int gpu_idx) const =0
 Get the NVML device memory Utilization metric. More...
 
virtual std::vector< int > active_process_list (int gpu_idx) const =0
 Get the list of PIDs with an active context on an NVML device. More...
 
virtual void frequency_control_sm (int gpu_idx, int min_freq, int max_freq) const =0
 Set min and max frequency for NVML device. More...
 
virtual void frequency_reset_control (int gpu_idx) const =0
 Reset min and max frequency for NVML device. More...
 
virtual void power_control (int gpu_idx, int setting) const =0
 Set power limit for NVML device. More...
 
virtual bool is_privileged_access (void) const =0
 
virtual void reset (void)=0
 

Constructor & Destructor Documentation

◆ NVMLDevicePool()

geopm::NVMLDevicePool::NVMLDevicePool ( )
default

◆ ~NVMLDevicePool()

virtual geopm::NVMLDevicePool::~NVMLDevicePool ( )
virtualdefault

Member Function Documentation

◆ active_process_list()

virtual std::vector<int> geopm::NVMLDevicePool::active_process_list ( int  gpu_idx) const
pure virtual

Get the list of PIDs with an active context on an NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
List of PIDs that are associated with a context on the specified NVML device.

Implemented in geopm::NVMLDevicePoolImp.

◆ cpu_affinity_ideal_mask()

virtual std::unique_ptr<cpu_set_t, std::function<void(cpu_set_t *)> > geopm::NVMLDevicePool::cpu_affinity_ideal_mask ( int  gpu_idx) const
pure virtual

CPU Affinitization mask for a particular GPU.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
CPU to GPU idea affinitization bitmask.

Implemented in geopm::NVMLDevicePoolImp.

◆ energy()

virtual uint64_t geopm::NVMLDevicePool::energy ( int  gpu_idx) const
pure virtual

Get the total energy consumed counter value for an NVML device in millijoules.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU energy consumption in millijoules.

Implemented in geopm::NVMLDevicePoolImp.

◆ frequency_control_sm()

virtual void geopm::NVMLDevicePool::frequency_control_sm ( int  gpu_idx,
int  min_freq,
int  max_freq 
) const
pure virtual

Set min and max frequency for NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
[in]min_freqTarget min frequency in MHz.
[in]max_freqTarget max frequency in MHz.

Implemented in geopm::NVMLDevicePoolImp.

◆ frequency_reset_control()

virtual void geopm::NVMLDevicePool::frequency_reset_control ( int  gpu_idx) const
pure virtual

Reset min and max frequency for NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.

Implemented in geopm::NVMLDevicePoolImp.

◆ frequency_status_mem()

virtual uint64_t geopm::NVMLDevicePool::frequency_status_mem ( int  gpu_idx) const
pure virtual

Get the NVML device memory subsystem frequency in MHz.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU memory frequency in MHz.

Implemented in geopm::NVMLDevicePoolImp.

◆ frequency_status_sm()

virtual uint64_t geopm::NVMLDevicePool::frequency_status_sm ( int  gpu_idx) const
pure virtual

Get the NVML device streaming multiprocessor frequency in MHz.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU streaming multiproccesor frequency in MHz.

Implemented in geopm::NVMLDevicePoolImp.

◆ frequency_supported_sm()

virtual std::vector<unsigned int> geopm::NVMLDevicePool::frequency_supported_sm ( int  gpu_idx) const
pure virtual

Get the supported NVML device streaming multiprocessor frequencies in MHz.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU supported streaming multiproccesor frequencies in MHz.

Implemented in geopm::NVMLDevicePoolImp.

◆ is_privileged_access()

virtual bool geopm::NVMLDevicePool::is_privileged_access ( void  ) const
pure virtual

Implemented in geopm::NVMLDevicePoolImp.

◆ num_gpu()

virtual int geopm::NVMLDevicePool::num_gpu ( void  ) const
pure virtual

Number of GPUs on the platform.

Returns
Number of NVML GPUs.

Implemented in geopm::NVMLDevicePoolImp.

◆ performance_state()

virtual uint64_t geopm::NVMLDevicePool::performance_state ( int  gpu_idx) const
pure virtual

Get the current performance state of an NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU performance state, defined by the NVML API as 0 to 15, with 0 being maximum performance, 15 being minimum performance, and 32 being unknown.

Implemented in geopm::NVMLDevicePoolImp.

◆ power()

virtual uint64_t geopm::NVMLDevicePool::power ( int  gpu_idx) const
pure virtual

Get the NVML device power in milliwatts.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU power consumption in milliwatts.

Implemented in geopm::NVMLDevicePoolImp.

◆ power_control()

virtual void geopm::NVMLDevicePool::power_control ( int  gpu_idx,
int  setting 
) const
pure virtual

Set power limit for NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
[in]settingPower cap in milliwatts.

Implemented in geopm::NVMLDevicePoolImp.

◆ power_limit()

virtual uint64_t geopm::NVMLDevicePool::power_limit ( int  gpu_idx) const
pure virtual

Get the NVML device power limit in milliwatts.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU power limit in milliwatts.

Implemented in geopm::NVMLDevicePoolImp.

◆ reset()

virtual void geopm::NVMLDevicePool::reset ( void  )
pure virtual

Implemented in geopm::NVMLDevicePoolImp.

◆ temperature()

virtual uint64_t geopm::NVMLDevicePool::temperature ( int  gpu_idx) const
pure virtual

Get the current NVML device temperature.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU temperature in Celsius.

Implemented in geopm::NVMLDevicePoolImp.

◆ throttle_reasons()

virtual uint64_t geopm::NVMLDevicePool::throttle_reasons ( int  gpu_idx) const
pure virtual

Get the current NVML device clock throttle reasons.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU clock throttle reasons as defined in nvml.h.

Implemented in geopm::NVMLDevicePoolImp.

◆ throughput_rx_pcie()

virtual uint64_t geopm::NVMLDevicePool::throughput_rx_pcie ( int  gpu_idx) const
pure virtual

Get the pcie receive throughput over a 20ms period for an NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU pcie receive throughput in kilobytes per second.

Implemented in geopm::NVMLDevicePoolImp.

◆ throughput_tx_pcie()

virtual uint64_t geopm::NVMLDevicePool::throughput_tx_pcie ( int  gpu_idx) const
pure virtual

Get the pcie transmit throughput over a 20ms period for an NVML device.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU pcie transmit throughput in kilobytes per second.

Implemented in geopm::NVMLDevicePoolImp.

◆ utilization()

virtual uint64_t geopm::NVMLDevicePool::utilization ( int  gpu_idx) const
pure virtual

Get the NVML device utilization metric.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU streaming multiprocessor utilization percentage as a whole number from 0 to 100.

Implemented in geopm::NVMLDevicePoolImp.

◆ utilization_mem()

virtual uint64_t geopm::NVMLDevicePool::utilization_mem ( int  gpu_idx) const
pure virtual

Get the NVML device memory Utilization metric.

Parameters
[in]gpu_idxThe index indicating a particular GPU.
Returns
GPU memory utilization percentage as a whole number from 0 to 100.

Implemented in geopm::NVMLDevicePoolImp.


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