Skip to content
Snippets Groups Projects
Commit aed3a1f3 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Fitch local fetch op in CFEM quadrature.

parent 111a4f1d
No related branches found
No related tags found
No related merge requests found
# FIXME NOT UPDATED YET FOR NEW-STYLE LOOPY! raise NotImplementedError("NOT UPDATED YET FOR NEW-STYLE LOOPY!") # FIXME
......
...@@ -60,7 +60,8 @@ def build_mass_mat_maker(ctx_factory=cl.create_some_context): ...@@ -60,7 +60,8 @@ def build_mass_mat_maker(ctx_factory=cl.create_some_context):
outer_slab_increments=(0,0)) outer_slab_increments=(0,0))
# fix reg prefetch # fix reg prefetch
knl = lp.add_prefetch(knl, "det_j", ["c_inner"]) knl = lp.add_prefetch(knl, "det_j", ["c_inner"],
loc_fetch_axes={0: (0, 1)})
#ilp = 4 #ilp = 4
#knl = lp.split_dimension(knl, "i", 2, outer_tag="g.0", inner_tag="l.1") #knl = lp.split_dimension(knl, "i", 2, outer_tag="g.0", inner_tag="l.1")
......
...@@ -123,7 +123,7 @@ def add_prefetch(kernel, input_access_descr, fetch_dims, loc_fetch_axes={}): ...@@ -123,7 +123,7 @@ def add_prefetch(kernel, input_access_descr, fetch_dims, loc_fetch_axes={}):
input_vector=ivec, input_vector=ivec,
index_expr=iexpr, index_expr=iexpr,
fetch_dims=fetch_dims, fetch_dims=fetch_dims,
loc_fetch_axes={}) loc_fetch_axes=loc_fetch_axes)
return kernel.copy(prefetch=new_prefetch) return kernel.copy(prefetch=new_prefetch)
......
...@@ -303,11 +303,17 @@ def generate_prefetch_code(kernel, sched_index, exec_domain): ...@@ -303,11 +303,17 @@ def generate_prefetch_code(kernel, sched_index, exec_domain):
from loopy.kernel import TAG_WORK_ITEM_IDX from loopy.kernel import TAG_WORK_ITEM_IDX
knl_work_item_inames = kernel.ordered_inames_by_tag_type(TAG_WORK_ITEM_IDX) knl_work_item_inames = kernel.ordered_inames_by_tag_type(TAG_WORK_ITEM_IDX)
used_kernel_work_item_inames = []
for realization_dim_idx, loc_fetch_axis_list in \ for realization_dim_idx, loc_fetch_axis_list in \
getattr(pf, "loc_fetch_axes", {}).iteritems(): pf.loc_fetch_axes.iteritems():
realization_inames[realization_dim_idx] = [knl_work_item_inames.pop(axis) loc_fetch_inames = [knl_work_item_inames[axis]
for axis in loc_fetch_axis_list] for axis in loc_fetch_axis_list]
realization_inames[realization_dim_idx] = loc_fetch_inames
used_kernel_work_item_inames.extend(loc_fetch_inames)
for inm in used_kernel_work_item_inames:
knl_work_item_inames.remove(inm)
# }}} # }}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment