Skip to main content

Mojo struct

Device

struct Device

Fields

  • idx (Int):
  • device (_DeviceImpl):

Implemented traits

AnyType, ImplicitlyDestructible, Writable

comptime members

__del__is_trivial

comptime __del__is_trivial = True

Methods

__init__

__init__(out self, idx: Int = 0)

get_driver_version

get_driver_version(self) -> DriverVersion

Returns NVIDIA driver version.

Returns:

DriverVersion

max_mem_clock

max_mem_clock(self) -> Int

Returns:

Int

max_graphics_clock

max_graphics_clock(self) -> Int

Returns:

Int

mem_clocks

mem_clocks(self) -> List[Int]

Returns:

List

graphics_clocks

graphics_clocks(self, memory_clock_mhz: Int) -> List[Int]

Returns:

List

set_clock

set_clock(self, mem_clock: Int, graphics_clock: Int)

gpu_turbo_enabled

gpu_turbo_enabled(self) -> Bool

Returns True if the gpu turbo is enabled.

Returns:

Bool

set_gpu_turbo

set_gpu_turbo(self, enabled: Bool = True)

Sets the GPU turbo state.

get_persistence_mode

get_persistence_mode(self) -> Bool

Returns True if the gpu persistence mode is enabled.

Returns:

Bool

set_persistence_mode

set_persistence_mode(self, enabled: Bool = True)

Sets the persistence mode.

set_max_gpu_clocks

set_max_gpu_clocks(device)

__str__

__str__(self) -> String

Returns:

String

write_to

write_to(self, mut writer: T)

__repr__

__repr__(self) -> String

Returns:

String

Was this page helpful?