2021-05-21 02:31:28 -07:00
|
|
|
#pragma once
|
2021-04-08 14:09:19 +05:30
|
|
|
#include "hip_test_context.hh"
|
|
|
|
|
#include <catch.hpp>
|
2021-05-21 02:31:28 -07:00
|
|
|
|
|
|
|
|
#define HIP_PRINT_STATUS(status) INFO(hipGetErrorName(status) << " at line: " << __LINE__);
|
|
|
|
|
|
|
|
|
|
#define HIPCHECK(error) \
|
|
|
|
|
{ \
|
|
|
|
|
hipError_t localError = error; \
|
|
|
|
|
if ((localError != hipSuccess) && (localError != hipErrorPeerAccessAlreadyEnabled)) { \
|
|
|
|
|
INFO("Error: " << hipGetErrorString(localError) << " Code: " << localError << " Str: " \
|
|
|
|
|
<< #error << " In File: " << __FILE__ << " At line: " << __LINE__); \
|
|
|
|
|
REQUIRE(false); \
|
|
|
|
|
} \
|
|
|
|
|
}
|
|
|
|
|
|