Skip to content

Commit c22c1a1

Browse files
Temporarily work around 1.12 failures (#674)
* Fix typo in exception reporting * Disable error reporting for 1.12 * Test 1.12 * Format
1 parent 627eb0e commit c22c1a1

2 files changed

Lines changed: 17 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
version: ['1.10', '1.11']
24+
version: ['1.10', '1.11', '1.12']
2525
os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2022]
2626
arch: [x64, arm64]
2727
pocl: [jll, local]

src/pocl/device/runtime.jl

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,29 @@ 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+
@static if VERSION < v"1.12"
14+
SPIRVIntrinsics.@printf(
15+
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
16+
ex, get_global_id(UInt32(1)), get_global_id(UInt32(2)), get_global_id(UInt32(3))
17+
)
18+
end
1719
return
1820
end
1921

2022
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")
23+
@static if VERSION < v"1.12"
24+
SPIRVIntrinsics.@printf(
25+
"ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n",
26+
ex, get_global_id(UInt32(1)), get_global_id(UInt32(2)), get_global_id(UInt32(3))
27+
)
28+
SPIRVIntrinsics.@printf("Stacktrace:\n")
29+
end
2630
return
2731
end
2832

2933
function report_exception_frame(idx, func, file, line)
30-
SPIRVIntrinsics.@printf(" [%d] %s at %s:%d\n", idx, func, file, line)
34+
@static if VERSION < v"1.12"
35+
SPIRVIntrinsics.@printf(" [%d] %s at %s:%d\n", idx, func, file, line)
36+
end
3137
return
3238
end

0 commit comments

Comments
 (0)