From 2c77b30a33e6f09436e24d096b6866970d18ad04 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 2 Nov 2016 17:34:10 -0500 Subject: [PATCH] More fixes to temp var scope finding --- loopy/preprocess.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/loopy/preprocess.py b/loopy/preprocess.py index 48bfbba3d..c0f42e55a 100644 --- a/loopy/preprocess.py +++ b/loopy/preprocess.py @@ -315,7 +315,7 @@ def _get_assignee_inames_tagged(kernel, insn, tag_base, tv_names): def find_temporary_scope(kernel): - logger.debug("%s: mark local temporaries" % kernel.name) + logger.debug("%s: find temporary scope" % kernel.name) new_temp_vars = {} from loopy.kernel.data import (LocalIndexTagBase, GroupIndexTag, @@ -388,8 +388,10 @@ def find_temporary_scope(kernel): grpparallel_compute_inames, temp_var_scope.GLOBAL), ]: - if (apin != cpin and bool(locparallel_assignee_inames)): - warn_with_kernel(kernel, "write_race_local(%s)" % insn_id, + if (apin != cpin and bool(apin)): + warn_with_kernel( + kernel, + "write_race_%s(%s)" % (scope_descr, insn_id), "instruction '%s' looks invalid: " "it assigns to indices based on %s IDs, but " "its temporary '%s' cannot be made %s because " -- GitLab