Skip to content
Snippets Groups Projects
Commit a8a1c487 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Silence warning about temporary not being written

It is a memory reinterpretation
parent d90300e2
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ from dune.perftool.generation.loopy import (constantarg,
iname,
instruction,
pymbolic_expr,
silenced_warning,
temporary_variable,
valuearg,
)
......
......@@ -13,6 +13,7 @@ import numpy
iname = generator_factory(item_tags=("iname",))
pymbolic_expr = generator_factory(item_tags=("kernel", "pymbolic"))
function_mangler = generator_factory(item_tags=("mangler",))
silenced_warning = generator_factory(item_tags=("silenced_warning",), no_deco=True)
@generator_factory(item_tags=("argument", "globalarg"),
......
......@@ -470,6 +470,7 @@ def generate_kernel(integrals):
temporaries = {i.name: i for i in retrieve_cache_items("temporary")}
arguments = [i for i in retrieve_cache_items("argument")]
manglers = retrieve_cache_functions("mangler")
silenced = [l for l in retrieve_cache_items("silenced_warning")]
# Construct an options object
from loopy import Options
......@@ -484,6 +485,7 @@ def generate_kernel(integrals):
function_manglers=manglers,
target=DuneTarget(),
options=opt,
silenced_warnings=silenced,
)
from loopy import make_reduction_inames_unique
......
......@@ -2,6 +2,7 @@ from dune.perftool.generation import (domain,
get_counter,
iname,
instruction,
silenced_warning,
)
from dune.perftool.loopy.buffer import (get_buffer_temporary,
initialize_buffer,
......@@ -53,6 +54,7 @@ def start_sumfactorization():
inp = get_buffer_temporary("buffer",
shape=shape,
dim_tags="f,f")
silenced_warning('read_no_write({})'.format(inp))
return sum_factorization_kernel(a_matrices, inp, "buffer")
......@@ -83,6 +85,9 @@ def sum_factorization_kernel(a_matrices, inp, buffer):
shape=inp_shape,
dim_tags="f,f")
# The input temporary will only be read from, so we need to silence the loopy warning
silenced_warning('read_no_write({})'.format(inp))
switch_base_storage(buffer)
# Get a temporary that interprets the base storage of the output
......
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