< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_gml library

Description

gh_gml is the GPU monitoring module. It is available for Windows, Linux, macOS and monitors NVIDIA GeForce/Quadro and AMD Radeon graphics cards.


Number of functions: 30

  1. gh_gml.geforce_logo_get_illumination ()
  2. gh_gml.geforce_logo_is_illumination_supported ()
  3. gh_gml.geforce_logo_set_illumination ()
  4. gh_gml.get_all_limiting_policies ()
  5. gh_gml.get_clocks ()
  6. gh_gml.get_fan_speed ()
  7. gh_gml.get_gpu_codename ()
  8. gh_gml.get_gpu_config ()
  9. gh_gml.get_gpu_cores ()
  10. gh_gml.get_gpu_driver ()
  11. gh_gml.get_gpu_eus ()
  12. gh_gml.get_gpu_fullname ()
  13. gh_gml.get_num_gpus ()
  14. gh_gml.get_pci_identifiers ()
  15. gh_gml.get_revision_id ()
  16. gh_gml.get_temperatures ()
  17. gh_gml.get_usages ()
  18. gh_gml.gpu_power_get_current_value ()
  19. gh_gml.gpu_power_get_power_limit ()
  20. gh_gml.amd_get_overdrive_version ()
  21. gh_gml.get_vram_usage ()
  22. gh_gml.gpu_power_get_current_value ()
  23. gh_gml.gpu_power_get_current_value_v2 ()
  24. gh_gml.amd_get_temperatures_rdna ()
  25. gh_gml.amd_get_power_rdna ()
  26. gh_gml.get_gpu_architecture ()
  27. gh_gml.amd_ags_get_gpu_info ()
  28. gh_gml.get_gpu_driver_v2 ()
  29. gh_gml.get_memory_info_v2 ()
  30. gh_gml.get_gpu_rt_tensor_cores ()



geforce_logo_get_illumination

Description

GTX 600/700: gets the current illumination value of the GeForce GTX LED logo.


Syntax

illum_value = gh_gml.geforce_logo_get_illumination(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


illum_value = gh_gml.geforce_logo_get_illumination(0)
			


geforce_logo_is_illumination_supported

Description

GTX 600/700: checks whether the GeForce GTX LED logo is supported.


Syntax

is_supported = gh_gml.geforce_logo_is_illumination_supported(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


is_supported = gh_gml.geforce_logo_is_illumination_supported(0)
			


geforce_logo_set_illumination

Description

GTX 600/700: sets the current illumination value of the GeForce GTX LED logo.


Syntax

gh_gml.geforce_logo_set_illumination(
 gpu_index,
 illum_value
)

Languages


Parameters


Return Values

This function has no return value(s).


Code sample


gh_gml.geforce_logo_set_illumination(0, illum_value)
			


get_all_limiting_policies

Description

Gets all policies that limits the GPU power (NVIDIA GPUs).


Syntax

power, temperature, voltage, overvoltage = gh_gml.get_all_limiting_policies(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


power, temperature, voltage, overvoltage = gh_gml.get_all_limiting_policies(0)

if (temperature == 1) then
    print("Limiting policy: temperature")
end
			


get_clocks

Description

Gets the GPU core and memory clock speeds.


Syntax

core_clock, mem_clock = gh_gml.get_clocks(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


core_clock, mem_clock = gh_gml.get_clocks(0)
			


get_fan_speed

Description

Gets the GPU fan speed.


Syntax

percent, rpm = gh_gml.get_fan_speed(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


percent, rpm = gh_gml.get_fan_speed(0)
			


get_gpu_codename

Description

Gets the GPU codename.


Syntax

name = gh_gml.get_gpu_codename(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


codename = gh_gml.get_gpu_codename(0)
			


get_gpu_config

Description

Gets the GPU config: cores, TMUs and ROPs.


Syntax

cores, tmus, rops = gh_gml.get_gpu_config(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


cores, tmus, rops = gh_gml.get_gpu_config(gpu_index)
			


get_gpu_cores

Description

Gets the shader cores of the GPU.


Syntax

num_cores = gh_gml.get_gpu_cores(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


cores = gh_gml.get_gpu_cores(0)
			


get_gpu_driver

Description

Gets the GPU driver.


Syntax

name = gh_gml.get_gpu_driver(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


driver_name = gh_gml.get_gpu_driver(0)
			


get_gpu_eus

Description

Gets the number of EUs (execution units) for Intel Arc GPUs.


Syntax

num_eus = gh_gml.get_gpu_eus(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


eus = gh_gml.get_gpu_eus(0)
			


get_gpu_fullname

Description

Gets the GPU name.


Syntax

name = gh_gml.get_gpu_fullname(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu_name = gh_gml.get_gpu_fullname(0)
			


get_num_gpus

Description

Returns the number of GPUs.


Syntax

num_gpus = gh_gml.get_num_gpus()

Languages


Parameters

This function has no input parameter(s).


Return Values


Code sample


num_gpus = gh_gml.get_num_gpus()
			


get_pci_identifiers

Description

Gets the PCI identifiers of the GPU (device and subdevice IDs).


Syntax

vendorID, deviceID, subvendorID, subdeviceID = gh_gml.get_pci_identifiers(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


vendorID, deviceID, subvendorID, subdeviceID = gh_gml.get_pci_identifiers(0)
			


get_revision_id

Description

Gets the revision ID of the GPU.


Syntax

revID = gh_gml.get_revision_id(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


revID = gh_gml.get_revision_id(0)
			


get_temperatures

Description

Gets the GPU core, mem, board and VRM temperatures if available.


Syntax

gpu, mem, pcb, vrm = gh_gml.get_temperatures(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu, mem, pcb, vrm = gh_gml.get_temperatures(0)
			


get_usages

Description

Gets the GPU core and memory usages.


Syntax

core_usage, mem_usage = gh_gml.get_usages(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


core_usage, mem_usage = gh_gml.get_usages(0)
			


gpu_power_get_current_value

Description

GTX 600/700: returns the current GPU power.


Syntax

power = gh_gml.gpu_power_get_current_value(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


power = gh_gml.gpu_power_get_current_value(0)
			


gpu_power_get_power_limit

Description

GTX 600/700: returns the power limit (or power target) of the GPU.


Syntax

power = gh_gml.gpu_power_get_power_limit(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


power_target = gh_gml.gpu_power_get_power_limit(0)
			


amd_get_overdrive_version

Description

Returns the overdrive version. For example, the overdrive is 8 for Navi GPUs.


Syntax

ver = gh_gml.amd_get_overdrive_version(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


ver = gh_gml.amd_get_overdrive_version(gpu_index)
			


get_vram_usage

Description

Returns the size and usage of the graphics memory.


Syntax

vram_size_mb, vram_usage_mb = gh_gml.get_vram_usage(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


vram_size_mb, vram_usage_mb = gh_gml.get_vram_usage(gpu_index)
			


gpu_power_get_current_value

Description

Returns the size and usage of the graphics memory.


Syntax

gpu_power_percent, gpu_power_watts = gh_gml.gpu_power_get_current_value(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu_power_percent, gpu_power_watts = gh_gml.gpu_power_get_current_value(gpu_index)
			


gpu_power_get_current_value_v2

Description

Returns the size and usage of the graphics memory.


Syntax

total_board_power_watts, chip_power_watts = gh_gml.gpu_power_get_current_value_v2(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


total_board_power_watts, chip_power_watts = gh_gml.gpu_power_get_current_value_v2(gpu_index)
			


amd_get_temperatures_rdna

Description

Returns the temperatures of a Navi / RDNA graphics card.


Syntax

gpu, mem, hotstop = gh_gml.amd_get_temperatures_rdna(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


gpu, mem, hotstop = gh_gml.amd_get_temperatures_rdna(gpu_index)
			


amd_get_power_rdna

Description

Returns the power consumption in Watts of a Navi / RDNA graphics card.


Syntax

asic, soc = gh_gml.amd_get_power_rdna(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


asic, soc = gh_gml.amd_get_power_rdna(gpu_index)
			


get_gpu_architecture

Description

Returns the GPU architecture for recent graphics cards (NVIDIA or AMD). For example: Maxwell, Turing, GCN1, Vega or RDNA.


Syntax

arch = gh_gml.get_gpu_architecture(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


arch = gh_gml.get_gpu_architecture(gpu_index)
			


amd_ags_get_gpu_info

Description

Returns some GPU information for AMD Radeon GPUs.


Syntax

num_cus, num_wgps, num_rops, core_clock, mem_clock = gh_gml.amd_ags_get_gpu_info(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


num_cus, num_wgps, num_rops, core_clock, mem_clock = gh_gml.amd_ags_get_gpu_info(gpu_index)
			


get_gpu_driver_v2

Description

Gets graphics driver information.


Syntax

driver_name, driver_version = gh_gml.get_gpu_driver_v2(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


driver_name, driver_version = gh_gml.get_gpu_driver_v2(gpu_index)
			


get_memory_info_v2

Description

Gets memory size information. Currently on NVIDIA only.


Syntax

memory_size_mb, cur_available_memory_size_mb = gh_gml.get_memory_info_v2(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


memory_size_mb, cur_available_memory_size_mb = gh_gml.get_memory_info_v2(gpu_index)
			


get_gpu_rt_tensor_cores

Description

Gets the number of RT (raytracing) and tensor cores. NVIDIA Turing+ GPUs only.


Syntax

rt_cores, tensor_cores = gh_gml.get_gpu_rt_tensor_cores(
 gpu_index
)

Languages


Parameters


Return Values


Code sample


rt_cores, tensor_cores = gh_gml.get_gpu_rt_tensor_cores(gpu_index)
			






GeeXLab Rootard Guide | Downloads | Contact