Mojo struct
Result
@register_passable(trivial)
struct Result
Fields
- code (
SIMD[int32, 1]
):
Implemented traits
AnyType
,
Copyable
,
EqualityComparable
,
Movable
,
Stringable
,
UnknownDestructibility
Aliases
ALREADY_INITIALIZED
alias ALREADY_INITIALIZED = Result(__init__[__mlir_type.!pop.int_literal](5))
Deprecated: Multiple initializations are now allowed through ref counting
ARGUMENT_VERSION_MISMATCH
alias ARGUMENT_VERSION_MISMATCH = Result(__init__[__mlir_type.!pop.int_literal](25))
The provided version is invalid/unsupported
CORRUPTED_INFOROM
alias CORRUPTED_INFOROM = Result(__init__[__mlir_type.!pop.int_literal](14))
infoROM is corrupted
DEPRECATED
alias DEPRECATED = Result(__init__[__mlir_type.!pop.int_literal](26))
The requested functionality has been deprecated
DRIVER_NOT_LOADED
alias DRIVER_NOT_LOADED = Result(__init__[__mlir_type.!pop.int_literal](9))
NVIDIA driver is not loaded
FREQ_NOT_SUPPORTED
alias FREQ_NOT_SUPPORTED = Result(__init__[__mlir_type.!pop.int_literal](24))
Ran out of critical resources, other than memory
FUNCTION_NOT_FOUND
alias FUNCTION_NOT_FOUND = Result(__init__[__mlir_type.!pop.int_literal](13))
Local version of NVML doesn't implement this function
GPU_IS_LOST
alias GPU_IS_LOST = Result(__init__[__mlir_type.!pop.int_literal](15))
The GPU has fallen off the bus or has otherwise become inaccessible
GPU_NOT_FOUND
alias GPU_NOT_FOUND = Result(__init__[__mlir_type.!pop.int_literal](28))
No GPUs were found
IN_USE
alias IN_USE = Result(__init__[__mlir_type.!pop.int_literal](19))
An operation cannot be performed because the GPU is currently in use
INSUFFICIENT_POWER
alias INSUFFICIENT_POWER = Result(__init__[__mlir_type.!pop.int_literal](8))
A device's external power cables are not properly attached
INSUFFICIENT_RESOURCES
alias INSUFFICIENT_RESOURCES = Result(__init__[__mlir_type.!pop.int_literal](23))
Ran out of critical resources, other than memory
INSUFFICIENT_SIZE
alias INSUFFICIENT_SIZE = Result(__init__[__mlir_type.!pop.int_literal](7))
An input argument is not large enough
INVALID_ARGUMENT
alias INVALID_ARGUMENT = Result(__init__[__mlir_type.!pop.int_literal](2))
A supplied argument is invalid
IRQ_ISSUE
alias IRQ_ISSUE = Result(__init__[__mlir_type.!pop.int_literal](11))
NVIDIA Kernel detected an interrupt issue with a GPU
LIB_RM_VERSION_MISMATCH
alias LIB_RM_VERSION_MISMATCH = Result(__init__[__mlir_type.!pop.int_literal](18))
RM detects a driver/library version mismatch
LIBRARY_NOT_FOUND
alias LIBRARY_NOT_FOUND = Result(__init__[__mlir_type.!pop.int_literal](12))
NVML Shared Library couldn't be found or loaded
MEMORY
alias MEMORY = Result(__init__[__mlir_type.!pop.int_literal](20))
Insufficient memory
NO_DATA
alias NO_DATA = Result(__init__[__mlir_type.!pop.int_literal](21))
No data
NO_PERMISSION
alias NO_PERMISSION = Result(__init__[__mlir_type.!pop.int_literal](4))
The current user does not have permission for operation
NOT_FOUND
alias NOT_FOUND = Result(__init__[__mlir_type.!pop.int_literal](6))
A query to find an object was unsuccessful
NOT_READY
alias NOT_READY = Result(__init__[__mlir_type.!pop.int_literal](27))
The system is not ready for the request
NOT_SUPPORTED
alias NOT_SUPPORTED = Result(__init__[__mlir_type.!pop.int_literal](3))
The requested operation is not available on target device
OPERATING_SYSTEM
alias OPERATING_SYSTEM = Result(__init__[__mlir_type.!pop.int_literal](17))
The GPU control device has been blocked by the operating system/cgroups
RESET_REQUIRED
alias RESET_REQUIRED = Result(__init__[__mlir_type.!pop.int_literal](16))
The GPU requires a reset before it can be used again
SUCCESS
alias SUCCESS = Result(__init__[__mlir_type.!pop.int_literal](0))
The operation was successful
TIMEOUT
alias TIMEOUT = Result(__init__[__mlir_type.!pop.int_literal](10))
User provided timeout passed
UNINITIALIZED
alias UNINITIALIZED = Result(__init__[__mlir_type.!pop.int_literal](1))
NVML was not first initialized with nvmlInit()
UNKNOWN
alias UNKNOWN = Result(__init__[__mlir_type.!pop.int_literal](999))
An internal driver error occurred
VGPU_ECC_NOT_SUPPORTED
alias VGPU_ECC_NOT_SUPPORTED = Result(__init__[__mlir_type.!pop.int_literal](22))
The requested vgpu operation is not available on target device, because ECC is enabled
Methods
__eq__
__eq__(self, other: Self) -> Bool
__ne__
__ne__(self, other: Self) -> Bool
__str__
__str__(self) -> String
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!