From dde0cafc43eeddfba230270fd11e98b480e2ba9b Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 14 Sep 2017 12:31:48 -0500 Subject: [PATCH] Replace defaultdict(lambda: set()) with defaultdict(set). --- loopy/preprocess.py | 2 +- loopy/schedule/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loopy/preprocess.py b/loopy/preprocess.py index ced1aaaa1..541b44f58 100644 --- a/loopy/preprocess.py +++ b/loopy/preprocess.py @@ -1928,7 +1928,7 @@ def find_idempotence(kernel): for insn in kernel.instructions) from collections import defaultdict - dep_graph = defaultdict(lambda: set()) + dep_graph = defaultdict(set) for insn in kernel.instructions: dep_graph[insn.id] = set(writer_id diff --git a/loopy/schedule/__init__.py b/loopy/schedule/__init__.py index 518d850e9..d28e7b1b3 100644 --- a/loopy/schedule/__init__.py +++ b/loopy/schedule/__init__.py @@ -1415,8 +1415,8 @@ class DependencyTracker(object): raise ValueError("unknown 'var_kind': %s" % var_kind) from collections import defaultdict - self.writer_map = defaultdict(lambda: set()) - self.reader_map = defaultdict(lambda: set()) + self.writer_map = defaultdict(set) + self.reader_map = defaultdict(set) self.temp_to_base_storage = kernel.get_temporary_to_base_storage_map() def map_to_base_storage(self, var_names): -- GitLab