|
6 | 6 |
|
7 | 7 | from devito.ir.iet import ( |
8 | 8 | Break, Call, Conditional, DummyExpr, EntryFunction, FindNodes, FindSymbols, Iteration, |
9 | | - List, Return, Transformer, KernelLaunch, make_callable, retrieve_iteration_tree |
| 9 | + KernelLaunch, List, Return, Transformer, make_callable |
10 | 10 | ) |
11 | 11 | from devito.passes.iet.engine import iet_pass |
12 | 12 | from devito.symbolics import CondEq, MathFunction |
13 | 13 | from devito.tools import dtype_to_ctype |
14 | 14 | from devito.types import Eq, Inc, LocalObject, Symbol |
15 | 15 |
|
16 | | -__all__ = ['check_stability', 'check_launch', 'error_mapper'] |
| 16 | +__all__ = ['check_launch', 'check_stability', 'error_mapper'] |
17 | 17 |
|
18 | 18 |
|
19 | 19 | def check_stability(graph, options=None, rcompile=None, sregistry=None, **kwargs): |
@@ -102,15 +102,15 @@ def _check_stability(iet, wmovs=(), rcompile=None, sregistry=None): |
102 | 102 | return iet, {'efuncs': efuncs, 'includes': includes} |
103 | 103 |
|
104 | 104 |
|
105 | | -def check_launch(graph, options={}, **kwargs): |
| 105 | +def check_launch(graph, options=None, **kwargs): |
106 | 106 | """ |
107 | 107 | Insert the CHECK_LAUNCH macro if errctl is set to ensure graceful handling of |
108 | 108 | failed kernel launches. This macro should only be inserted if the kernel is |
109 | 109 | directly within a loop, as compilation will fail otherwise. |
110 | 110 | """ |
111 | | - if not options.get('errctl', False): |
| 111 | + if options is None or not options.get('errctl', False): |
112 | 112 | return |
113 | | - |
| 113 | + |
114 | 114 | langbb = kwargs['langbb'] |
115 | 115 |
|
116 | 116 | definition = make_launch_macros(langbb) |
|
0 commit comments