Device side assert support

[ROCm/hip commit: 40ff42e555]
이 커밋은 다음에 포함됨:
Rahul Garg
2017-09-07 20:45:27 +05:30
부모 f66a03fa9c
커밋 d1425f3cf5
2개의 변경된 파일과 3개의 추가작업 그리고 1개의 파일을 삭제
+1 -1
파일 보기
@@ -99,7 +99,7 @@ extern int HIP_TRACE_API;
// TODO-HCC add a dummy implementation of assert, need to replace with a proper kernel exit call.
#if __HIP_DEVICE_COMPILE__ == 1
#undef assert
#define assert(COND) { if (COND) {} }
#define assert(COND) { if (!COND) {abort();} }
#endif
+2
파일 보기
@@ -111,6 +111,8 @@ kernelName<<<numblocks,numthreads,memperblock,streamId>>>(__VA_ARGS__);\
#ifdef __HIP_DEVICE_COMPILE__
#define abort() {asm("trap;");}
#undef assert
#define assert(COND) { if (!COND) {abort();} }
#endif
#endif