Python class
ClockStats
ClockStats
class max.profiler.gpu.ClockStats(core_mhz, core_max_mhz, mem_mhz, mem_max_mhz, throttle_reasons)
Bases: Struct
Current and maximum GPU clock rates plus throttle reasons.
Captures the core (SM/graphics on NVIDIA, system clock on AMD) and memory
clock rates measured at sample time along with the device’s boost ceiling
for each domain. Consumers can compare current to max clocks (or inspect
throttle_reasons) to detect runs whose performance is limited by
hardware throttling rather than the workload itself.
throttle_reasons is a list of vendor-neutral
ThrottleReason values. Note that "gpu_idle" is reported
whenever the GPU is idle, so a non-empty list does not on its own
indicate throttling – intersect with HARDWARE_THROTTLE_REASONS
to detect hardware-induced throttling specifically. On AMD,
throttle_reasons is None because ROCm-SMI does not expose an
equivalent single-call API.
-
Parameters:
-
- core_mhz (int)
- core_max_mhz (int)
- mem_mhz (int | None)
- mem_max_mhz (int | None)
- throttle_reasons (list[Literal['gpu_idle', 'applications_clocks_setting', 'sw_power_cap', 'hw_slowdown', 'sync_boost', 'sw_thermal_slowdown', 'hw_thermal_slowdown', 'hw_power_brake_slowdown', 'display_clock_setting']] | None)
core_max_mhz
core_max_mhz: int
Maximum (boost) core clock rate in MHz.
core_mhz
core_mhz: int
Current core clock rate in MHz (SM clock on NVIDIA, system clock on AMD).
mem_max_mhz
Maximum (boost) memory clock rate in MHz, or None if the vendor library did not report it.
mem_mhz
Current memory clock rate in MHz, or None if the vendor library did not report it.
throttle_reasons
throttle_reasons: list[Literal['gpu_idle', 'applications_clocks_setting', 'sw_power_cap', 'hw_slowdown', 'sync_boost', 'sw_thermal_slowdown', 'hw_thermal_slowdown', 'hw_power_brake_slowdown', 'display_clock_setting']] | None
Vendor-neutral reasons the clock is below boost.
"gpu_idle" is reported whenever the GPU is idle, so consumers
should intersect with HARDWARE_THROTTLE_REASONS when checking
for hardware throttling. None when the vendor library does not
expose a throttle-reason API.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!