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_graphics_clock
mem_clocks
graphics_clocks
set_clock
set_clock(self, mem_clock: Int, graphics_clock: Int)
gpu_turbo_enabled
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:
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?
Thank you! We'll create more content like this.
Thank you for helping us improve!