Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions src/device/runtime.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,23 @@ malloc(sz) = C_NULL

report_oom(sz) = return

report_exception(ex) = return
function report_exception(ex)
@printf(
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
ex, get_global_id(UInt32(0)), get_global_id(UInt32(1)), get_global_id(UInt32(2))
)
return
end

report_exception_name(ex) = return
function report_exception_name(ex)
@printf(
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\nStacktrace:\n",
ex, get_global_id(UInt32(0)), get_global_id(UInt32(1)), get_global_id(UInt32(2))
)
return
end

report_exception_frame(idx, func, file, line) = return
function report_exception_frame(idx, func, file, line)
@printf(" [%d] %s at %s:%d\n", idx, func, file, line)
return
end
Loading