in HIPCHECK, only run command once even if error occurs
[ROCm/clr commit: c482a3f456]
This commit is contained in:
@@ -29,12 +29,15 @@
|
||||
|
||||
|
||||
#define HIPCHECK(error) \
|
||||
if (error != hipSuccess) { \
|
||||
{\
|
||||
hipError_t localError = error; \
|
||||
if (localError != hipSuccess) { \
|
||||
printf("%serror: '%s'(%d) at %s:%d%s\n", \
|
||||
KRED,hipGetErrorString(error), error,\
|
||||
KRED,hipGetErrorString(localError), localError,\
|
||||
__FILE__, __LINE__,KNRM); \
|
||||
failed("API returned error code.");\
|
||||
}
|
||||
}\
|
||||
}
|
||||
|
||||
#define HIPASSERT(condition) \
|
||||
if (! (condition) ) { \
|
||||
|
||||
Reference in New Issue
Block a user