Device side assert support
这个提交包含在:
1 父节点
8add022539
当前提交
9dcf2ad751
2 个文件已更改
+3
-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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
在新工单中引用
屏蔽一个用户