Updated hipErrorString and CUDAErrorTohipError (#1365)
This commit is contained in:
committato da
Maneesh Gupta
parent
5c4f78bac3
commit
0722704f35
@@ -216,38 +216,80 @@ inline static hipError_t hipCUDAErrorTohipError(cudaError_t cuError) {
|
||||
switch (cuError) {
|
||||
case cudaSuccess:
|
||||
return hipSuccess;
|
||||
case cudaErrorProfilerDisabled:
|
||||
return hipErrorProfilerDisabled;
|
||||
case cudaErrorProfilerNotInitialized:
|
||||
return hipErrorProfilerNotInitialized;
|
||||
case cudaErrorProfilerAlreadyStarted:
|
||||
return hipErrorProfilerAlreadyStarted;
|
||||
case cudaErrorProfilerAlreadyStopped:
|
||||
return hipErrorProfilerAlreadyStopped;
|
||||
case cudaErrorInsufficientDriver:
|
||||
return hipErrorInsufficientDriver;
|
||||
case cudaErrorUnsupportedLimit:
|
||||
return hipErrorUnsupportedLimit;
|
||||
case cudaErrorPeerAccessUnsupported:
|
||||
return hipErrorPeerAccessUnsupported;
|
||||
case cudaErrorInvalidGraphicsContext:
|
||||
return hipErrorInvalidGraphicsContext;
|
||||
case cudaErrorSharedObjectSymbolNotFound:
|
||||
return hipErrorSharedObjectSymbolNotFound;
|
||||
case cudaErrorSharedObjectInitFailed:
|
||||
return hipErrorSharedObjectInitFailed;
|
||||
case cudaErrorOperatingSystem:
|
||||
return hipErrorOperatingSystem;
|
||||
case cudaErrorSetOnActiveProcess:
|
||||
return hipErrorSetOnActiveProcess;
|
||||
case cudaErrorIllegalAddress:
|
||||
return hipErrorIllegalAddress;
|
||||
case cudaErrorInvalidSymbol:
|
||||
return hipErrorInvalidSymbol;
|
||||
case cudaErrorMissingConfiguration:
|
||||
return hipErrorMissingConfiguration;
|
||||
case cudaErrorMemoryAllocation:
|
||||
return hipErrorMemoryAllocation;
|
||||
case cudaErrorLaunchOutOfResources:
|
||||
return hipErrorLaunchOutOfResources;
|
||||
case cudaErrorInvalidValue:
|
||||
return hipErrorInvalidValue;
|
||||
case cudaErrorInvalidResourceHandle:
|
||||
return hipErrorInvalidResourceHandle;
|
||||
case cudaErrorInvalidDevice:
|
||||
return hipErrorInvalidDevice;
|
||||
case cudaErrorInvalidMemcpyDirection:
|
||||
return hipErrorInvalidMemcpyDirection;
|
||||
case cudaErrorInvalidDevicePointer:
|
||||
return hipErrorInvalidDevicePointer;
|
||||
case cudaErrorInitializationError:
|
||||
return hipErrorInitializationError;
|
||||
case cudaErrorNoDevice:
|
||||
return hipErrorNoDevice;
|
||||
case cudaErrorNotReady:
|
||||
return hipErrorNotReady;
|
||||
case cudaErrorLaunchFailure:
|
||||
return hipErrorLaunchFailure;
|
||||
case cudaErrorPriorLaunchFailure:
|
||||
return hipErrorPriorLaunchFailure;
|
||||
case cudaErrorLaunchOutOfResources:
|
||||
return hipErrorLaunchOutOfResources;
|
||||
case cudaErrorInvalidDeviceFunction:
|
||||
return hipErrorInvalidDeviceFunction;
|
||||
case cudaErrorInvalidConfiguration:
|
||||
return hipErrorInvalidConfiguration;
|
||||
case cudaErrorInvalidDevice:
|
||||
return hipErrorInvalidDevice;
|
||||
case cudaErrorInvalidValue:
|
||||
return hipErrorInvalidValue;
|
||||
case cudaErrorInvalidDevicePointer:
|
||||
return hipErrorInvalidDevicePointer;
|
||||
case cudaErrorInvalidMemcpyDirection:
|
||||
return hipErrorInvalidMemcpyDirection;
|
||||
case cudaErrorUnknown:
|
||||
return hipErrorUnknown;
|
||||
case cudaErrorPeerAccessNotEnabled:
|
||||
return hipErrorPeerAccessNotEnabled;
|
||||
case cudaErrorInvalidResourceHandle:
|
||||
return hipErrorInvalidResourceHandle;
|
||||
case cudaErrorNotReady:
|
||||
return hipErrorNotReady;
|
||||
case cudaErrorNoDevice:
|
||||
return hipErrorNoDevice;
|
||||
case cudaErrorPeerAccessAlreadyEnabled:
|
||||
return hipErrorPeerAccessAlreadyEnabled;
|
||||
case cudaErrorPeerAccessNotEnabled:
|
||||
return hipErrorPeerAccessNotEnabled;
|
||||
case cudaErrorHostMemoryAlreadyRegistered:
|
||||
return hipErrorHostMemoryAlreadyRegistered;
|
||||
case cudaErrorHostMemoryNotRegistered:
|
||||
return hipErrorHostMemoryNotRegistered;
|
||||
case cudaErrorUnsupportedLimit:
|
||||
return hipErrorUnsupportedLimit;
|
||||
case cudaErrorMapBufferObjectFailed:
|
||||
return hipErrorMapBufferObjectFailed;
|
||||
case cudaErrorAssert:
|
||||
return hipErrorAssert;
|
||||
case cudaErrorNotSupported:
|
||||
return hipErrorNotSupported;
|
||||
default:
|
||||
return hipErrorUnknown; // Note - translated error.
|
||||
}
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user