Skip to content
Merged
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
23 changes: 13 additions & 10 deletions src/pocl/device/runtime.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# reset the runtime cache from global scope, so that any change triggers recompilation
GPUCompiler.reset_runtime()

signal_exception() = return

malloc(sz) = C_NULL
Expand All @@ -7,23 +10,23 @@ report_oom(sz) = return
import SPIRVIntrinsics: get_global_id

function report_exception(ex)
SPIRVIntrinsics.@printf(
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
ex, get_global_id(0), get_global_id(1), get_global_id(2)
)
# SPIRVIntrinsics.@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

function report_exception_name(ex)
SPIRVIntrinsics.@printf(
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
ex, get_global_id(0), get_global_id(1), get_global_id(2)
)
SPIRVIntrinsics.@printf("Stacktrace:\n")
# SPIRVIntrinsics.@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))
# )
# SPIRVIntrinsics.@printf("Stacktrace:\n")
return
end

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