Skip to content

Commit 5a87b8c

Browse files
authored
[LIBCLC] Add functionality for in-kernel asserts for CUDA backend (#5174)
Adding functionality for in-kernel asserts with CUDA backend. Responding to #3385.
1 parent 8fefb25 commit 5a87b8c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libclc/ptx-nvidiacl/libspirv/SOURCES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
assert/__assert_fail.cl
12
reflect.ll
23
atomic/loadstore_helpers.ll
34
cl_khr_int64_extended_atomics/minmax_helpers.ll
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <spirv/spirv.h>
2+
3+
void __assertfail(const char *__message, const char *__file, unsigned __line,
4+
const char *__function);
5+
6+
_CLC_DECL void __assert_fail(const char *expr, const char *file,
7+
unsigned int line, const char *func) {
8+
__assertfail(expr, file, line, func);
9+
}

0 commit comments

Comments
 (0)