DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
DeviceExceptions.hip.h File Reference

Go to the source code of this file.

Macros

#define DEVICE_API_CHECK(cmd)
 
#define DEVICEBLAS_API_CHECK(expr)
 

Macro Definition Documentation

◆ DEVICE_API_CHECK

#define DEVICE_API_CHECK ( cmd)
Value:
do \
{ \
hipError_t e = cmd; \
if (e != hipSuccess) \
{ \
printf("Failed: HIP error %s:%d '%s'\n", \
__FILE__, \
__LINE__, \
hipGetErrorString(e)); \
exit(EXIT_FAILURE); \
} \
} \
while (0)

◆ DEVICEBLAS_API_CHECK

#define DEVICEBLAS_API_CHECK ( expr)
Value:
{ \
hipblasStatus_t __hipblas_error = expr; \
if ((__hipblas_error) != HIPBLAS_STATUS_SUCCESS) \
{ \
printf( \
"hipBLAS error on or before line number %d in file: %s. Error code: %d.\n", \
__LINE__, \
__FILE__, \
__hipblas_error); \
} \
}