From bc324c37392a7b87aa4bf6fac469156cf29111eb Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 9 Jun 2016 11:18:15 -0500 Subject: [PATCH] Fix reduce() silliness. --- loopy/schedule/device_mapping.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/loopy/schedule/device_mapping.py b/loopy/schedule/device_mapping.py index c393fe7c2..4bbf99d57 100644 --- a/loopy/schedule/device_mapping.py +++ b/loopy/schedule/device_mapping.py @@ -87,11 +87,8 @@ def get_common_hw_inames(kernel, insn_ids): # Get the list of hardware inames in which the temporary is defined. if len(insn_ids) == 0: return set() - id_to_insn = kernel.id_to_insn - from six.moves import reduce - return reduce( - set.intersection, - (get_hw_inames(kernel, id_to_insn[id]) for id in insn_ids)) + return set.intersection( + *(get_hw_inames(kernel, kernel.id_to_insn[id]) for id in insn_ids)) def remove_illegal_loops_for_hw_tagged_inames_in_schedule(kernel): -- GitLab