From a2dee0356af6e30da5b6a791c29dc4c3da898f3b Mon Sep 17 00:00:00 2001 From: Christian Guinard <28689358+christiangnrd@users.noreply.github.com> Date: Fri, 6 Feb 2026 08:08:04 -0400 Subject: [PATCH] [nanoPOCL] Re-enable error reporting in 1.12+ #674 --- src/pocl/device/runtime.jl | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/pocl/device/runtime.jl b/src/pocl/device/runtime.jl index 0c862eaa..e185b937 100644 --- a/src/pocl/device/runtime.jl +++ b/src/pocl/device/runtime.jl @@ -10,29 +10,23 @@ report_oom(sz) = return import SPIRVIntrinsics: get_global_id function report_exception(ex) - @static if VERSION < v"1.12" - SPIRVIntrinsics.@printf( - "ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n", - ex, get_global_id(UInt32(1)), get_global_id(UInt32(2)), get_global_id(UInt32(3)) - ) - end + SPIRVIntrinsics.@printf( + "ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n", + ex, get_global_id(UInt32(1)), get_global_id(UInt32(2)), get_global_id(UInt32(3)) + ) return end function report_exception_name(ex) - @static if VERSION < v"1.12" - SPIRVIntrinsics.@printf( - "ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n", - ex, get_global_id(UInt32(1)), get_global_id(UInt32(2)), get_global_id(UInt32(3)) - ) - SPIRVIntrinsics.@printf("Stacktrace:\n") - end + SPIRVIntrinsics.@printf( + "ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n", + ex, get_global_id(UInt32(1)), get_global_id(UInt32(2)), get_global_id(UInt32(3)) + ) + SPIRVIntrinsics.@printf("Stacktrace:\n") return end function report_exception_frame(idx, func, file, line) - @static if VERSION < v"1.12" - SPIRVIntrinsics.@printf(" [%d] %s at %s:%d\n", idx, func, file, line) - end + SPIRVIntrinsics.@printf(" [%d] %s at %s:%d\n", idx, func, file, line) return end