From 47f87cde2b7b37810f200ec83c7dabfffffdb77f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 5 Jun 2016 12:58:37 -0500 Subject: [PATCH] Make an explicit way to set outer inames in add_prefetch --- loopy/transform/data.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/loopy/transform/data.py b/loopy/transform/data.py index 6038bb88e..89ad1cdb5 100644 --- a/loopy/transform/data.py +++ b/loopy/transform/data.py @@ -139,7 +139,8 @@ def add_prefetch(kernel, var_name, sweep_inames=[], dim_arg_names=None, temporary_name=None, temporary_scope=None, temporary_is_local=None, footprint_subscripts=None, - fetch_bounding_box=False): + fetch_bounding_box=False, + fetch_outer_inames=None): """Prefetch all accesses to the variable *var_name*, with all accesses being swept through *sweep_inames*. @@ -153,6 +154,9 @@ def add_prefetch(kernel, var_name, sweep_inames=[], dim_arg_names=None, such as those occurring in dimension splits are recorded and also applied to these indices. + :arg fetch_outer_inames: The inames within which the fetch + instruction is nested. If *None*, make an educated guess. + This function combines :func:`extract_subst` and :func:`precompute`. """ @@ -246,7 +250,8 @@ def add_prefetch(kernel, var_name, sweep_inames=[], dim_arg_names=None, default_tag=default_tag, dtype=arg.dtype, fetch_bounding_box=fetch_bounding_box, temporary_name=temporary_name, - temporary_scope=temporary_scope, temporary_is_local=temporary_is_local) + temporary_scope=temporary_scope, temporary_is_local=temporary_is_local, + precompute_outer_inames=fetch_outer_inames) # {{{ remove inames that were temporarily added by slice sweeps -- GitLab