Skip to content

Commit

Permalink
get hsa error string from ROCR
Browse files Browse the repository at this point in the history
  • Loading branch information
scchan committed Apr 3, 2020
1 parent e88a422 commit 98ee9f3
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions lib/hsa/mcwamp_hsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,38 +198,9 @@ static const char* getHcCommandKindString(Kalmar::hcCommandKind k) {
return case_string;
};



static const char* getHSAErrorString(hsa_status_t s) {

const char* case_string;
switch(s) {
CASE_STRING(HSA_STATUS_ERROR);
CASE_STRING(HSA_STATUS_ERROR_INVALID_ARGUMENT);
CASE_STRING(HSA_STATUS_ERROR_INVALID_QUEUE_CREATION);
CASE_STRING(HSA_STATUS_ERROR_INVALID_ALLOCATION);
CASE_STRING(HSA_STATUS_ERROR_INVALID_AGENT);
CASE_STRING(HSA_STATUS_ERROR_INVALID_REGION);
CASE_STRING(HSA_STATUS_ERROR_INVALID_SIGNAL);
CASE_STRING(HSA_STATUS_ERROR_INVALID_QUEUE);
CASE_STRING(HSA_STATUS_ERROR_OUT_OF_RESOURCES);
CASE_STRING(HSA_STATUS_ERROR_INVALID_PACKET_FORMAT);
CASE_STRING(HSA_STATUS_ERROR_RESOURCE_FREE);
CASE_STRING(HSA_STATUS_ERROR_NOT_INITIALIZED);
CASE_STRING(HSA_STATUS_ERROR_REFCOUNT_OVERFLOW);
CASE_STRING(HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS);
CASE_STRING(HSA_STATUS_ERROR_INVALID_INDEX);
CASE_STRING(HSA_STATUS_ERROR_INVALID_ISA);
CASE_STRING(HSA_STATUS_ERROR_INVALID_ISA_NAME);
CASE_STRING(HSA_STATUS_ERROR_INVALID_CODE_OBJECT);
CASE_STRING(HSA_STATUS_ERROR_INVALID_EXECUTABLE);
CASE_STRING(HSA_STATUS_ERROR_FROZEN_EXECUTABLE);
CASE_STRING(HSA_STATUS_ERROR_INVALID_SYMBOL_NAME);
CASE_STRING(HSA_STATUS_ERROR_VARIABLE_ALREADY_DEFINED);
CASE_STRING(HSA_STATUS_ERROR_VARIABLE_UNDEFINED);
CASE_STRING(HSA_STATUS_ERROR_EXCEPTION);
default: case_string = "Unknown Error Code";
};
hsa_status_string(s, &case_string);
return case_string;
}

Expand Down

0 comments on commit 98ee9f3

Please sign in to comment.