SWDEV-397031 - fix device functions as well (#352)

Change-Id: I9081a5497c89b563c3761e533bb9ee03d61f5867
This commit is contained in:
Jatin Chaudhary
2023-07-08 16:25:55 +01:00
committed by GitHub
parent d6b0f53ac7
commit 3e1169eb51
@@ -23,8 +23,15 @@
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
#include <iostream>
#include <stdexcept>
#define HIP_ASSERT(status) assert(status == hipSuccess)
#define HIP_ASSERT(status) \
{ \
if ((status != hipSuccess)) { \
std::cerr << "Failed in: " << __LINE__ << " on hip call: " #status << std::endl; \
throw std::runtime_error("generic failure"); \
} \
}
#define LEN 512
extern __device__ int square_me(int);