Skip to content

Commit d2ae2fa

Browse files
committed
enable printf in errors again
1 parent f600e50 commit d2ae2fa

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ pocl_jll = "7"
5353
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
5454
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
5555
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
56+
57+
[sources]
58+
SPIRVIntrinsics = {url = "https://github.com/JuliaGPU/OpenCL.jl", rev = "master", subdir = "lib/intrinsics"}

src/pocl/device/runtime.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ report_oom(sz) = return
1010
import SPIRVIntrinsics: get_global_id
1111

1212
function report_exception(ex)
13-
# SPIRVIntrinsics.@printf(
14-
# "ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
15-
# ex, get_global_id(UInt32(0)), get_global_id(UInt32(1)), get_global_id(UInt32(2))
16-
# )
13+
SPIRVIntrinsics.@printf(
14+
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
15+
ex, get_global_id(UInt32(0)), get_global_id(UInt32(1)), get_global_id(UInt32(2))
16+
)
1717
return
1818
end
1919

2020
function report_exception_name(ex)
21-
# SPIRVIntrinsics.@printf(
22-
# "ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
23-
# ex, get_global_id(UInt32(0)), get_global_id(UInt32(1)), get_global_id(UInt32(2))
24-
# )
25-
# SPIRVIntrinsics.@printf("Stacktrace:\n")
21+
SPIRVIntrinsics.@printf(
22+
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
23+
ex, get_global_id(UInt32(0)), get_global_id(UInt32(1)), get_global_id(UInt32(2))
24+
)
25+
SPIRVIntrinsics.@printf("Stacktrace:\n")
2626
return
2727
end
2828

2929
function report_exception_frame(idx, func, file, line)
30-
# SPIRVIntrinsics.@printf(" [%d] %s at %s:%d\n", idx, func, file, line)
30+
SPIRVIntrinsics.@printf(" [%d] %s at %s:%d\n", idx, func, file, line)
3131
return
3232
end

0 commit comments

Comments
 (0)