HIP Exceptions in Python#

This module contains all possible exceptions that can be thrown by HIP and related libraries, along with a brief description of each.

exception einsums.gpu_except.Success#

This can be thrown when a HIP function exits successfully. It is normally suppressed, but can be thrown if requested.

exception einsums.gpu_except.ErrorInvalidValue#

Indicates that at least one of the arguments passed to a function is NULL.

exception einsums.gpu_except.ErrorOutOfMemory#

Indicates that the requested allocation could not be completed due to not having enough free memory to accomodate.

exception einsums.gpu_except.ErrorMemoryAllocation#

Indicates a memory allocation error. It is superceded by ErrorOutOfMemory.

exception einsums.gpu_except.ErrorNotInitialized#

This is thrown when the GPU device has not been initialized, such as by a call to hipFree(nullptr);.

exception einsums.gpu_except.ErrorInitializationError#

Superceded by ErrorNotInitialized.

exception einsums.gpu_except.ErrorDeinitialized#

This is thrown if an operation is attempted after a device has been de-initialized, such as by a call to hipDeviceReset.

exception einsums.gpu_except.ErrorProfilerDisabled#

This is thrown if an attempt is made to profile an application, but the profiler has been disabled.

exception einsums.gpu_except.ErrorProfilerNotInitialized#

This is thrown if an attempt is made to profile an application, but the profiler has not yet been initialized.

exception einsums.gpu_except.ErrorProfilerAlreadyStarted#

This is thrown if the code tries to start the profiler, but the profiler is already running.

exception einsums.gpu_except.ErrorProfilerAlreadyStopped#

This is thrown if the code tries to stop the profiler, but it has already been stopped.

exception einsums.gpu_except.ErrorInvalidConfiguration#

This is thrown when the device is not configured for a certain operation, such as interprocess communication.

exception einsums.gpu_except.ErrorInvalidPitchValue#

Indicates that the pitch of an array is invalid for some reason.

exception einsums.gpu_except.ErrorInvalidSymbol#

Thrown when an operation tries to access a symbol that is not valid for some reason, such as being null, or not being allocated.

exception einsums.gpu_except.ErrorInvalidDevicePointer#

Thrown when a function expects a device pointer, but the pointer provided is invalid. A common issue that can cause this is passing a host pointer instead of a device pointer.

exception einsums.gpu_except.ErrorInvalidMemcpyDirection#

Thrown when a hipMemcpy is initiated, but the pointers are not of the right occupancy for the direction specified.

exception einsums.gpu_except.ErrorInsufficientDriver#

This is thrown when an operation is attempted that is not supported by the current device driver.

exception einsums.gpu_except.ErrorMissingConfiguration#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorPriorLaunchFailure#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorInvalidDeviceFunction#

Thrown when an attempt is made to access or modify a device function, but the requested function is invalid for some reason.

exception einsums.gpu_except.ErrorNoDevice#

This is thrown when no device can be found to run code.

exception einsums.gpu_except.ErrorInvalidDevice#

This is thrown when trying to access a device with an ID outside of the range of enumerated devices.

exception einsums.gpu_except.ErrorInvalidImage#

Thrown when a cooperative group is launched with an invalid image. This is likely due to the code being compiled for the wrong architecture.

exception einsums.gpu_except.ErrorInvalidContext#

“Produced when input context is invalid” (from hip_runtime_api.h). This is often due to using a handle to something that is not defined in the current context.

exception einsums.gpu_except.ErrorContextAlreadyCurrent#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorMapFailed#

Thrown when an attempt to map some portion of memory into some virtual address space fails.

exception einsums.gpu_except.ErrorMapBufferObjectFailed#

Superceded by ErrorMapFailed.

exception einsums.gpu_except.ErrorUnmapFailed#

Thrown when an attempt to unmap some portion of virtual memory fails. For instance, if it has already been unmapped, this may be thrown.

exception einsums.gpu_except.ErrorArrayIsMapped#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorAlreadyMapped#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorNoBinaryForGpu#

Raised when there are multiple devices on the system, but a binary can not be found for some of them.

exception einsums.gpu_except.ErrorAlreadyAcquired#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorNotMapped#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorNotMappedAsArray#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorNotMappedAsPointer#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorECCNotCorrectable#

Unused as of now. Likely thrown when a response on the PCI bus fails the error correction check in a way that is detectable but not correctable.

exception einsums.gpu_except.ErrorUnsupportedLimit#

Thrown when trying to get or set a limit that is not supported by the device.

exception einsums.gpu_except.ErrorContextAlreadyInUse#

Thrown when trying to modify a context currently in use. Deprecated on AMD only.

exception einsums.gpu_except.ErrorPeerAccessUnsupported#

Thrown when trying to access a device on a multi-device system, but the operation is unsupported by either devices or the driver.

exception einsums.gpu_except.ErrorInvalidKernelFile#

Unkown as of now. This seems to be unused but not deprecated. There is also a note in hip_runtime_api.h - In CUDA DRV, it is CUDA_ERROR_PTX

exception einsums.gpu_except.ErrorInvalidGraphicsContext#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorInvalidSource#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorFileNotFound#

Thrown when trying to load data from a module, but the file can not be found.

exception einsums.gpu_except.ErrorSharedObjectSymbolNotFound#

Thrown when trying to load data from a module, but the requested symbol is not found in the module.

exception einsums.gpu_except.ErrorSharedObjectInitFailed#

Thrown when trying to initialize a shared object library, but an error occurs.

exception einsums.gpu_except.ErrorOperatingSystem#

Thrown when a binary is built for one operating system but being run on a different system.

exception einsums.gpu_except.ErrorInvalidHandle#

Thrown when using a handle for an event or stream that is invalid for some reason.

exception einsums.gpu_except.ErrorInvalidResourceHandle#

Superceded by ErrorInvalidHandle

exception einsums.gpu_except.ErrorIllegalState#

Thrown when a resource is in a state that does not support the requested operation.

exception einsums.gpu_except.ErrorNotFound#

Thrown when trying to find a variable in a module, but the variable can not be found.

exception einsums.gpu_except.ErrorNotReady#

Thrown when trying to query an event’s properties when those properties haven’t been computed yet. For instance, trying to find the elapsed time, but the event is still running. This is not actually an error, according to the HIP documentation.

exception einsums.gpu_except.ErrorIllegalAddress#

Unknown as of now. This seems to be unused but not deprecated.

exception einsums.gpu_except.ErrorLaunchOutOfResources#

This is thrown when trying to launch a cooperative kernel, but there are not enough resources available for the kernel to run.

exception einsums.gpu_except.ErrorLaunchTimeOut#

This is thrown when trying to launch a cooperative kernel, but one of the devices times out.

exception einsums.gpu_except.ErrorPeerAccessAlreadyEnabled#

Thrown when trying to enable peer access on the current device, but it has already been enabled.

exception einsums.gpu_except.ErrorPeerAccessNotEnabled#

Thrown when trying to access a peer device, but peer access has not been enabled.

exception einsums.gpu_except.ErrorSetOnActiveProcess#

Not well documented. Thrown when trying to set flags for how the device should behave while the device is running a process that would be affected by those changes.

exception einsums.gpu_except.ErrorContextIsDestroyed#

Thrown when trying to destroy a context, but the context has already been destroyed.

exception einsums.gpu_except.ErrorAssert#

Thrown when an internal assertion fails.

exception einsums.gpu_except.ErrorHostMemoyrAlreadyRegistered#

Thrown when trying to register host memory, but that memory has already been registered.

exception einsums.gpu_except.ErrorHostMemoryNotRegistered#

Thrown when trying to unregister host memory, but that memory has not been registered or is already unregistered.

exception einsums.gpu_except.ErrorLaunchFailure#

Thrown when something goes wrong when launching a kernel.

exception einsums.gpu_except.ErrorCooperativeLaunchTooLarge#

Thrown when trying to launch a cooperative kernel with too many blocks.

exception einsums.gpu_except.ErrorNotSupported#

Thrown when the HIP API is not supported.

exception einsums.gpu_except.ErrorStreamCaptureUnsupported#

Thrown when trying to perform an operation that is not allowed when a stream is capturing.

exception einsums.gpu_except.ErrorStreamCaptureInvalidated#

Thrown when a previous error has invalidated a stream capture.

exception einsums.gpu_except.ErrorStreamCaptureMerge#

Thrown when an operation would have merged two independent stream captures.

exception einsums.gpu_except.ErrorStreamCaptureUnmatched#

Thrown when a stream tries to use a capture that was created for another stream.

exception einsums.gpu_except.ErrorStreamCaptureUnjoined#

Indicates that a stream capture was forked and never rejoined.

exception einsums.gpu_except.ErrorStreamCaptureIsolation#

Thrown when a cross-stream dependency would have been created.

exception einsums.gpu_except.ErrorStreamCaptureImplicit#

Thrown when an operation would have caused a disallowed implicit dependency in a capture.

exception einsums.gpu_except.ErrorCapturedEvent#

Indicates that an operation was not permitted on an event in a stream that is actively capturing.

exception einsums.gpu_except.ErrorStreamCaptureWrongThread#

A capture operation was initiated on a thread that does not have access to the stream.

exception einsums.gpu_except.ErrorGraphExecUpdateFailure#

This is thrown when a graph update would have violated certain constraints.

exception einsums.gpu_except.ErrorUnknown#

Thrown when an unknown error has occurred.

exception einsums.gpu_except.ErrorRuntimeMemory#

An internal memory call produced an error. Not seen on production systems.

exception einsums.gpu_except.ErrorRuntimeOther#

An internal call that is not a memory call produced an error. Not seen on production systems.

exception einsums.gpu_except.ErrorTbd#

Placeholder error for future expansion.

exception einsums.gpu_except.blasSuccess#

This can be thrown when a hipBLAS function exits successfully. It is normally suppressed, but can be thrown if requested.

exception einsums.gpu_except.blasNotInitialized#

Thrown when trying to perform a BLAS operation when the environment has not been initialized.

exception einsums.gpu_except.blasAllocFailed#

Thrown when an operation tries to allocate memory, such as a work array, but the allocation returned an invalid value.

exception einsums.gpu_except.blasInvalidValue#

Thrown when invalid values are passed to a BLAS call. For instance, many operations have constraints on strides or increment values. This would be thrown if those constraints are violated.

exception einsums.gpu_except.blasMappingError#

Thrown when an attempt to map memory into some virtual address space fails.

exception einsums.gpu_except.blasExecutionFailed#

Thrown when a BLAS operation fails for some reason.

exception einsums.gpu_except.blasInternalError#

Thrown when an internal operation fails.

exception einsums.gpu_except.blasNotSupported#

Thrown when an operation is not supported. For instance, not all systems support half-precision BLAS calls.

exception einsums.gpu_except.blasArchMismatch#

Thrown when hipBLAS was compiled for one architecture but is being used for another.

exception einsums.gpu_except.blasHandleIsNullptr#

Thrown when nullptr is passed as the handle for a BLAS operation.

exception einsums.gpu_except.blasInvalidEnum#

Thrown when an invalid value is passed to an enum argument. For instance, when calling gemm, BLAS expects to be told either to not transpose a matrix, transpose a matrix, or conjugate and transpose a matrix. Any other value would cause this error to be thrown.

exception einsums.gpu_except.blasUnknown#

Thrown when an unknown error occurs.

exception einsums.gpu_except.solverSuccess#

This can be thrown when a hipSolver function exits successfully. It is normally suppressed, but can be thrown if requested.

exception einsums.gpu_except.solverNotInitialized#

Thrown when trying to perform a LAPACK operation when the environment has not been initialized.

exception einsums.gpu_except.solverAllocFailed#

Thrown when an operation tries to allocate memory, such as a work array, but the allocation returned an invalid value.

exception einsums.gpu_except.solverInvalidValue#

Thrown when invalid values are passed to a LAPACK call. For instance, many operations have constraints on strides or increment values. This would be thrown if those constraints are violated.

exception einsums.gpu_except.solverMappingError#

Thrown when an attempt to map memory into some virtual address space fails.

exception einsums.gpu_except.solverExecutionFailed#

Thrown when a LAPACK operation fails for some reason.

exception einsums.gpu_except.solverInternalError#

Thrown when an internal operation fails.

exception einsums.gpu_except.solverFuncNotSupported#

Thrown when an operation is not supported. For instance, not all systems support half-precision LAPACK calls.

exception einsums.gpu_except.solverArchMismatch#

Thrown when hipSolver was compiled for one architecture but is being used for another.

exception einsums.gpu_except.solverHandleIsNullptr#

Thrown when nullptr is passed as the handle for a LAPACK operation.

exception einsums.gpu_except.solverInvalidEnum#

Thrown when an invalid value is passed to an enum argument. For instance, when calling geev, LAPACK expects to be told whether or not to compute the left or right eigenvectors. Any other value would cause this error to be thrown.

exception einsums.gpu_except.solverUnknown#

Thrown when an unknown error occurs.