How to reset GPU after launch failure

If I write a kernel that fails for whatever reason, julia becomes unable to use the GPU for the remainder of the session

example :

CUDA error: unspecified launch failure (code #719, ERROR_LAUNCH_FAILED)

Sadly, CUDA doesn’t allow us to do that, so the only course of action is restarting Julia.

1 Like

Since somebody just liked this post: Note that nowadays, on recent hardware (Volta or higher), Julia exceptions are supported and will not leave the GPU in a unrecoverable state.

1 Like