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

Fix unintended modification of inames_to_dup in insn_options_stack

parent 71b36c93
No related branches found
No related tags found
1 merge request!57Fix inames to dup stateful mess
Pipeline #
...@@ -211,10 +211,15 @@ def parse_insn_options(opt_dict, options_str, assignee_names=None): ...@@ -211,10 +211,15 @@ def parse_insn_options(opt_dict, options_str, assignee_names=None):
for value in opt_value.split(":"): for value in opt_value.split(":"):
arrow_idx = value.find("->") arrow_idx = value.find("->")
if arrow_idx >= 0: if arrow_idx >= 0:
result.setdefault("inames_to_dup", []).append( result["inames_to_dup"] = (
(value[:arrow_idx], value[arrow_idx+2:])) result.get("inames_to_dup", [])
+
[(value[:arrow_idx], value[arrow_idx+2:])])
else: else:
result.setdefault("inames_to_dup", []).append((value, None)) result["inames_to_dup"] = (
result.get("inames_to_dup", [])
+
[(value, None)])
elif opt_key == "dep" and opt_value is not None: elif opt_key == "dep" and opt_value is not None:
if opt_value.startswith("*"): if opt_value.startswith("*"):
...@@ -1765,6 +1770,9 @@ def make_kernel(domains, instructions, kernel_data=["..."], **kwargs): ...@@ -1765,6 +1770,9 @@ def make_kernel(domains, instructions, kernel_data=["..."], **kwargs):
*seq_dependencies* added. *seq_dependencies* added.
""" """
logger.info(
"%s: kernel creation start" % kwargs.get("name", "(unnamed)"))
defines = kwargs.pop("defines", {}) defines = kwargs.pop("defines", {})
default_order = kwargs.pop("default_order", "C") default_order = kwargs.pop("default_order", "C")
default_offset = kwargs.pop("default_offset", 0) default_offset = kwargs.pop("default_offset", 0)
...@@ -1904,6 +1912,7 @@ def make_kernel(domains, instructions, kernel_data=["..."], **kwargs): ...@@ -1904,6 +1912,7 @@ def make_kernel(domains, instructions, kernel_data=["..."], **kwargs):
# Must infer inames before determining shapes. # Must infer inames before determining shapes.
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
knl = determine_shapes_of_temporaries(knl) knl = determine_shapes_of_temporaries(knl)
knl = expand_defines_in_shapes(knl, defines) knl = expand_defines_in_shapes(knl, defines)
knl = guess_arg_shape_if_requested(knl, default_order) knl = guess_arg_shape_if_requested(knl, default_order)
knl = apply_default_order_to_args(knl, default_order) knl = apply_default_order_to_args(knl, default_order)
...@@ -1924,6 +1933,9 @@ def make_kernel(domains, instructions, kernel_data=["..."], **kwargs): ...@@ -1924,6 +1933,9 @@ def make_kernel(domains, instructions, kernel_data=["..."], **kwargs):
from loopy.preprocess import prepare_for_caching from loopy.preprocess import prepare_for_caching
knl = prepare_for_caching(knl) knl = prepare_for_caching(knl)
logger.info(
"%s: kernel creation done" % knl.name)
return knl return knl
# }}} # }}}
......
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