Skip to content
Snippets Groups Projects
Commit 2f0cac0b authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'silence-unmatched-dep-error' into 'master'

Silence unmatched dep error

See merge request !98
parents 6aa19cf6 4fe2bf78
No related branches found
Tags v2016.1.1
No related merge requests found
......@@ -1642,11 +1642,11 @@ def _resolve_dependencies(knl, insn, deps):
new_deps.append(other_insn.id)
found_any = True
if not found_any:
if not found_any and knl.options.check_dep_resolution:
raise LoopyError("instruction '%s' declared a depency on '%s', "
"which did not resolve to any instruction present in the "
"kernel '%s'"
% (insn.id, dep, knl.name))
"kernel '%s'. Set the kernel option 'check_dep_resolution'"
"to False to disable this check." % (insn.id, dep, knl.name))
for dep_id in new_deps:
if dep_id not in knl.id_to_insn:
......
......@@ -95,6 +95,11 @@ class Options(ImmutableRecord):
determining whether an iname duplication is necessary
for the kernel to be schedulable.
.. attribute:: check_dep_resolution
Whether loopy should issue an error if a dependency
expression does not match any instructions in the kernel.
.. rubric:: Invocation-related options
.. attribute:: skip_arg_checks
......@@ -200,6 +205,7 @@ class Options(ImmutableRecord):
allow_terminal_colors_def),
disable_global_barriers=kwargs.get("disable_global_barriers",
False),
check_dep_resolution=kwargs.get("check_dep_resolution", True),
)
# {{{ legacy compatibility
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment