Skip to main content

Mojo struct

Result

struct Result

Fields

  • code (Int32):

Implemented traits

AnyType, Copyable, Equatable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members

ALREADY_INITIALIZED

comptime ALREADY_INITIALIZED = Result(Int32(5))

Deprecated: Multiple initializations are now allowed through ref counting.

ARGUMENT_VERSION_MISMATCH

comptime ARGUMENT_VERSION_MISMATCH = Result(Int32(25))

The provided version is invalid/unsupported.

CORRUPTED_INFOROM

comptime CORRUPTED_INFOROM = Result(Int32(14))

The infoROM is corrupted.

DEPRECATED

comptime DEPRECATED = Result(Int32(26))

The requested functionality has been deprecated.

DRIVER_NOT_LOADED

comptime DRIVER_NOT_LOADED = Result(Int32(9))

NVIDIA driver is not loaded.

FREQ_NOT_SUPPORTED

comptime FREQ_NOT_SUPPORTED = Result(Int32(24))

Ran out of critical resources, other than memory.

FUNCTION_NOT_FOUND

comptime FUNCTION_NOT_FOUND = Result(Int32(13))

Local version of NVML doesn't implement this function.

GPU_IS_LOST

comptime GPU_IS_LOST = Result(Int32(15))

The GPU has fallen off the bus or has otherwise become inaccessible.

GPU_NOT_FOUND

comptime GPU_NOT_FOUND = Result(Int32(28))

No GPUs were found.

IN_USE

comptime IN_USE = Result(Int32(19))

An operation cannot be performed because the GPU is currently in use.

INSUFFICIENT_POWER

comptime INSUFFICIENT_POWER = Result(Int32(8))

A device's external power cables are not properly attached.

INSUFFICIENT_RESOURCES

comptime INSUFFICIENT_RESOURCES = Result(Int32(23))

Ran out of critical resources, other than memory.

INSUFFICIENT_SIZE

comptime INSUFFICIENT_SIZE = Result(Int32(7))

An input argument is not large enough.

INVALID_ARGUMENT

comptime INVALID_ARGUMENT = Result(Int32(2))

A supplied argument is invalid.

IRQ_ISSUE

comptime IRQ_ISSUE = Result(Int32(11))

NVIDIA Kernel detected an interrupt issue with a GPU.

LIB_RM_VERSION_MISMATCH

comptime LIB_RM_VERSION_MISMATCH = Result(Int32(18))

RM detects a driver/library version mismatch.

LIBRARY_NOT_FOUND

comptime LIBRARY_NOT_FOUND = Result(Int32(12))

NVML Shared Library couldn't be found or loaded.

MEMORY

comptime MEMORY = Result(Int32(20))

Insufficient memory.

NO_DATA

comptime NO_DATA = Result(Int32(21))

No data.

NO_PERMISSION

comptime NO_PERMISSION = Result(Int32(4))

The current user does not have permission for operation.

NOT_FOUND

comptime NOT_FOUND = Result(Int32(6))

A query to find an object was unsuccessful.

NOT_READY

comptime NOT_READY = Result(Int32(27))

The system is not ready for the request.

NOT_SUPPORTED

comptime NOT_SUPPORTED = Result(Int32(3))

The requested operation is not available on target device.

OPERATING_SYSTEM

comptime OPERATING_SYSTEM = Result(Int32(17))

The GPU control device has been blocked by the operating system/cgroups.

RESET_REQUIRED

comptime RESET_REQUIRED = Result(Int32(16))

The GPU requires a reset before it can be used again.

SUCCESS

comptime SUCCESS = Result(Int32(0))

The operation was successful.

TIMEOUT

comptime TIMEOUT = Result(Int32(10))

User provided timeout passed.

UNINITIALIZED

comptime UNINITIALIZED = Result(Int32(1))

NVML was not first initialized with nvmlInit().

UNKNOWN

comptime UNKNOWN = Result(Int32(999))

An internal driver error occurred.

VGPU_ECC_NOT_SUPPORTED

comptime VGPU_ECC_NOT_SUPPORTED = Result(Int32(22))

The requested vgpu operation is not available on target device, because ECC is enabled.

Methods

__eq__

__eq__(self, other: Self) -> Bool

Returns:

Bool

write_to

write_to(self, mut writer: T)

Was this page helpful?