From 5af1734d378928fe5452e787389e206dbb23d7e5 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sun, 6 Mar 2022 13:27:14 -0600 Subject: [PATCH] Minor cleanups to sectioning comments and logging --- loopy/translation_unit.py | 6 ++++-- loopy/type_inference.py | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/loopy/translation_unit.py b/loopy/translation_unit.py index 9b40eb532..71f67f2ab 100644 --- a/loopy/translation_unit.py +++ b/loopy/translation_unit.py @@ -591,7 +591,7 @@ class CallablesInferenceContext(ImmutableRecord): # }}} - # AIM: Preserve the entrypoints of *program* + # {{{ preserve the entrypoints of *program* # If there are any callees having old entrypoint names => mark them for # renaming @@ -609,7 +609,9 @@ class CallablesInferenceContext(ImmutableRecord): todo_renames[e] = history[e] assert todo_renames[e] in program.entrypoints - # try to rollback the names as much as possible + # }}} + + # try to roll back the names as much as possible for new_id in new_callable_ids: old_func_id = history[new_id] if (isinstance(old_func_id, str) diff --git a/loopy/type_inference.py b/loopy/type_inference.py index 2ad687cb0..89571836e 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -405,7 +405,6 @@ class TypeInferenceMapper(CombineMapper): return self.rec(expr.aggregate) def map_call(self, expr, return_tuple=False): - from pymbolic.primitives import Variable identifier = expr.function @@ -772,7 +771,7 @@ class _DictUnionView: def infer_unknown_types_for_a_single_kernel(kernel, clbl_inf_ctx): """Infer types on temporaries and arguments.""" - logger.debug("%s: infer types" % kernel.name) + logger.debug("%s: infer types", kernel.name) from functools import partial debug = partial(_debug, kernel) -- GitLab