Skip to content

Commit 8b7c781

Browse files
committed
compiler: Add KernelLaunchClusterConfig error handler
1 parent 8b157fe commit 8b7c781

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

devito/operator/operator.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,15 @@ def _postprocess_errors(self, retval):
703703
"due to excessive register pressure in one of the Operator "
704704
"kernels. Try supplying a smaller `par-tile` value."
705705
)
706+
elif retval == error_mapper['KernelLaunchClusterConfig']:
707+
raise ExecutionError(
708+
"Kernel launch failed due to an invalid thread block cluster "
709+
"configuration. This is probably due to a `tbc-tile` value that "
710+
"does not perfectly divide the number of blocks launched for a "
711+
"kernel. This is a known, strong limitation which effectively "
712+
"prevents the use of `tbc-tile` in realistic scenarios, but it "
713+
"will be removed in future versions."
714+
)
706715
elif retval == error_mapper['KernelLaunchUnknown']:
707716
raise ExecutionError(
708717
"Kernel launch failed due to an unknown error. This might "

devito/passes/iet/errors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,6 @@ class Retval(LocalObject, Expr):
109109
'Stability': 100,
110110
'KernelLaunch': 200,
111111
'KernelLaunchOutOfResources': 201,
112-
'KernelLaunchUnknown': 202,
112+
'KernelLaunchClusterConfig': 202,
113+
'KernelLaunchUnknown': 203,
113114
}

0 commit comments

Comments
 (0)