Skip to content

Commit

Permalink
misc: Support more types of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Dec 20, 2024
1 parent 6c70fe2 commit 1424bf4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions devito/operator/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,18 @@ def _postprocess_errors(self, retval):
raise ExecutionError("Detected nan/inf in some output Functions")
elif retval == error_mapper['KernelLaunch']:
raise ExecutionError("Kernel launch failed")
elif retval == error_mapper['KernelLaunchOutOfResources']:
raise ExecutionError(
"Kernel launch failed due to insufficient resources. This may be "
"due to excessive register pressure in one of the Operator "
"kernels. Try supplying a smaller `par-tile` value."
)
elif retval == error_mapper['KernelLaunchUnknown']:
raise ExecutionError(
"Kernel launch failed due to an unknown error. This might "
"simply indicate memory corruption, but also, in a more unlikely "
"case, a hardware issue. Please report this issue to the "
"Devito team.")
else:
raise ExecutionError("An error occurred during execution")

Expand Down
2 changes: 2 additions & 0 deletions devito/passes/iet/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,6 @@ class Retval(LocalObject, Expr):
error_mapper = {
'Stability': 100,
'KernelLaunch': 200,
'KernelLaunchOutOfResources': 201,
'KernelLaunchUnknown': 202,
}

0 comments on commit 1424bf4

Please sign in to comment.