Skip to content
Snippets Groups Projects
Commit 9d48f29a authored by Marcel Koch's avatar Marcel Koch
Browse files

silence read_no_write warning for vectorized buffer

parent ef9e2a22
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import pymbolic.primitives as prim
from loopy.match import Tagged, Id, Writes, Or
from dune.perftool.generation import get_global_context_value, silenced_warning
from dune.perftool.generation import get_global_context_value
from dune.perftool.loopy.target import dtype_floatingpoint
from dune.perftool.loopy.temporary import DuneTemporaryVariable
from dune.perftool.loopy.symbolic import substitute
......@@ -349,6 +349,7 @@ def add_iname_array(knl, vec_iname):
scope=lp.temp_var_scope.PRIVATE, dtype=np.float64,
base_storage=vec_iname + '_buff',
_base_storage_access_may_be_aliasing=True)
silenced_warning = ["read_no_write({})".format(vector_name)]
new_insns = [lp.Assignment(assignee=prim.Subscript(prim.Variable(array_name), (prim.Variable(vec_iname),)),
expression=prim.Variable(vec_iname),
......@@ -366,7 +367,8 @@ def add_iname_array(knl, vec_iname):
new_insns.append(insn)
knl = knl.copy(instructions=new_insns,
temporary_variables=dict(**knl.temporary_variables, **new_temporaries),)
temporary_variables=dict(**knl.temporary_variables, **new_temporaries),
silenced_warnings=knl.silenced_warnings + silenced_warning)
knl = lp.duplicate_inames(knl, [vec_iname], within=Id('init_{}_buffer'.format(vec_iname)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment