Skip to content

Commit ddb850d

Browse files
committed
✨ Add a way to check cuda call and just return;
1 parent eb9d793 commit ddb850d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Plugin/Utilities/include/cuda_include.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// use this macro if you want to check cuda function
77
#define CUDA_CHECK(ans) cudaAssert((ans), __FILE__, __LINE__)
88
#define CUDA_CHECK_RETURN(ans) {int ret = cudaAssert((ans), __FILE__, __LINE__); if(ret != 0)return ret;}
9+
#define CUDA_CHECK_RETURN_VOID(ans, msg) {int ret = cudaAssert((ans), __FILE__, __LINE__); if(ret != 0){Log::log().debugLogError(msg);return;}}
910
#define CUFFT_CHECK(ans) cufftAssert((int)(ans), __FILE__, __LINE__)
1011
#define CUFFT_CHECK_RETURN(ans) { int ret = cufftAssert((int)(ans), __FILE__, __LINE__); return ret; }
1112

0 commit comments

Comments
 (0)