From 3169a8a899cadeb6f73f7825bfbeb78d44969c47 Mon Sep 17 00:00:00 2001 From: Marmaduke Woodman Date: Tue, 13 Feb 2018 09:26:00 +0100 Subject: [PATCH] avoid seq to_batched iname batching --- loopy/transform/batch.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/loopy/transform/batch.py b/loopy/transform/batch.py index 7e6b03581..2ad417696 100644 --- a/loopy/transform/batch.py +++ b/loopy/transform/batch.py @@ -64,17 +64,15 @@ class _BatchVariableChanger(RuleAwareIdentityMapper): def needs_batch_subscript(self, name): tv = self.kernel.temporary_variables.get(name) - - if name in self.batch_varying_args: - return True - if not self.sequential: + if self.sequential: + return name in self.batch_varying_args + else: if tv is None: return False if not temp_needs_batching_if_not_sequential(tv, self.batch_varying_args): return False - - return True + return True def map_subscript(self, expr, expn_state): if not self.needs_batch_subscript(expr.aggregate.name): -- GitLab