cuda.core.system._device.ClockInfo#

class cuda.core.system._device.ClockInfo(handle, clock_type: ClockType | str)#

Accesses various clock information about a device.

Methods

__init__(*args, **kwargs)#
get_current_mhz(
self,
clock_id: ClockId | str = ClockId.CURRENT,
) int#

Get the current clock speed of a specific clock domain, in MHz.

For Kepler™ or newer fully supported devices.

Parameters:

clock_id (ClockId | str) – The clock ID to query. Defaults to the current clock value.

Returns:

The clock speed in MHz.

Return type:

int

get_max_customer_boost_mhz(self) int#

Get the maximum customer boost clock speed of a specific clock, in MHz.

For Pascal™ or newer fully supported devices.

Returns:

The maximum customer boost clock speed in MHz.

Return type:

int

get_max_mhz(self) int#

Get the maximum clock speed of a specific clock domain, in MHz.

For Fermi™ or newer fully supported devices.

Current P0 clocks (reported by get_current_mhz() can differ from max clocks by a few MHz.

Returns:

The maximum clock speed in MHz.

Return type:

int

get_min_max_clock_of_pstate_mhz(
self,
int pstate: int,
) tuple[int, int]#

Get the minimum and maximum clock speeds for this clock domain at a given performance state (Pstate), in MHz.

Parameters:

pstate (int) – The performance state to query. Must be an int between 0 and 15, where 0 is the highest performance state (P0) and 15 is the lowest (P15).

Returns:

A tuple containing the minimum and maximum clock speeds in MHz.

Return type:

tuple[int, int]

get_offsets(self, int pstate: int) ClockOffsets#

Retrieve min, max and current clock offset of some clock domain for a given Pstate.

For Maxwell™ or newer fully supported devices.

Parameters:

pstate (int) – The performance state to query. Must be an int between 0 and 15, where 0 is the highest performance state (P0) and 15 is the lowest (P15).

Returns:

An object with the min, max and current clock offset.

Return type:

ClockOffsets