Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling/reporting API #383

Open
maleadt opened this issue Apr 14, 2023 · 0 comments
Open

Error handling/reporting API #383

maleadt opened this issue Apr 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@maleadt
Copy link
Member

maleadt commented Apr 14, 2023

I noticed DiffEqGPU doing a plain error() in GPU code: https://github.com/SciML/DiffEqGPU.jl/blob/dddcb594ce054c0677bc1b18fdabca2fc0c2eaa9/src/perform_step/gpu_tsit5_perform_step.jl#L152

That's of course not great, and leads to inscrutable errors:

ERROR: a exception was thrown during kernel execution.
       Run Julia on debug level 2 for device stack traces.

Running on -g2 doesn't actually help because the error function is not inlined, leading to multiple call sites.

KA.jl should probably offer an @error and @assert macro that display an error message and halt execution. On CUDA.jl the latter may be implemented using @cuassert (which has the annoying consequence of breaking CUDA, because it yields a sticky error, so we may not want to).

@maleadt maleadt changed the title Error handling/reporting macros Error handling/reporting API Apr 14, 2023
@vchuravy vchuravy added the enhancement New feature or request label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants