-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Description
In C++, it's not possible to convert enum values back into their corresponding names since all the symbols are discarded in compiling.
Having a method to display the error at run-time seems pretty important.
const char* miopenGetErrorString(miopenStatus_t status) {
switch (status) {
case miopenStatusSuccess:
return "miopenStatusSuccess";
case miopenStatusNotInitialized:
return "miopenStatusNotInitialized";
case miopenStatusInvalidValue:
return "miopenStatusInvalidValue";
case miopenStatusBadParm:
return "miopenStatusBadParm";
case miopenStatusAllocFailed:
return "miopenStatusAllocFailed";
case miopenStatusInternalError:
return "miopenStatusInternalError";
case miopenStatusNotImplemented:
return "miopenStatusNotImplemented";
case miopenStatusUnknownError:
return "miopenStatusUnknownError";
default:
return "Unrecognized Status Code";
}
}
Metadata
Metadata
Assignees
Labels
No labels