Error handling#
-
hipError_t hipGetLastError(void)#
Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess.
Returns the last error that has been returned by any of the runtime calls in the same host thread, and then resets the saved error to hipSuccess.
See also
hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t
- Returns:
return code from last HIP called from the active host thread
-
hipError_t hipExtGetLastError(void)#
Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess.
Returns the last error that has been returned by any of the runtime calls in the same host thread, and then resets the saved error to hipSuccess.
See also
hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t
- Returns:
return code from last HIP called from the active host thread
-
hipError_t hipPeekAtLastError(void)#
Return last error returned by any HIP runtime API call.
Returns the last error that has been returned by any of the runtime calls in the same host thread. Unlike hipGetLastError, this function does not reset the saved error code.
See also
hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t
- Returns:
hipSuccess
-
const char *hipGetErrorName(hipError_t hip_error)#
Return hip error as text string form.
See also
hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t
- Parameters:
hip_error – Error code to convert to name.
- Returns:
const char pointer to the NULL-terminated error name
-
const char *hipGetErrorString(hipError_t hipError)#
Return handy text string message to explain the error which occurred.
See also
hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t
- Parameters:
hipError – Error code to convert to string.
- Returns:
const char pointer to the NULL-terminated error string
-
hipError_t hipDrvGetErrorName(hipError_t hipError, const char **errorString)#
Return hip error as text string form.
See also
hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t
- Parameters:
hipError – [in] Error code to convert to string.
errorString – [out] char pointer to the NULL-terminated error string
- Returns:
hipSuccess, hipErrorInvalidValue
-
hipError_t hipDrvGetErrorString(hipError_t hipError, const char **errorString)#
Return handy text string message to explain the error which occurred.
See also
hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t
- Parameters:
hipError – [in] Error code to convert to string.
errorString – [out] char pointer to the NULL-terminated error string
- Returns:
hipSuccess, hipErrorInvalidValue