POCL: pass the exception type to @gputhrow - #790
Merged
Merged
Conversation
Contributor
Benchmark ResultsShow table
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
vchuravy
approved these changes
Sep 23, 2026
Replace `@print_and_throw reason` by `@gputhrow name reason`, which takes the name of the exception type separately, like CUDA.jl, Metal.jl and OpenCL.jl do, and includes it in the printed message. This makes the quirks the same across back-ends, apart from how the exception is reported, which prepares for sharing them.
christiangnrd
force-pushed
the
tb/gputhrow
branch
from
September 23, 2026 14:44
eeaaa9a to
5a3872a
Compare
Member
|
I cancelled buildkite runs since this only touches pocl and there are 384 jobs waiting in the JuliaGPU cluster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is preparation for sharing the exception quirks (Base methods that are overridden so that exceptions don't box their arguments) across back-ends. Those are nearly identical across CUDA.jl, AMDGPU.jl, Metal.jl, OpenCL.jl, oneAPI.jl and KernelAbstractions' POCL back-end, except for the macro that throws: CUDA.jl, Metal.jl and OpenCL.jl use
@gputhrow name reason, taking the name of the exception type and a reason.Here, the POCL back-end's
@print_and_throw reasonbecomes@gputhrow name reason, which also includes the exception type in the printed message, e.g.ERROR: BoundsError: Out-of-bounds array access.(I dropped the period from thesincosreason, which was printed twice.) Checked locally with kernels throwing aBoundsErrorand aDomainError.Based on #789; GitHub will retarget this PR to
mainonce that one is merged.