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

Avoid warnings for precomputation temporaries

parent d1cd793c
No related branches found
No related tags found
No related merge requests found
......@@ -505,8 +505,16 @@ def extract_kernel_from_cache(tag, wrap_in_cgen=True):
# Precompute all the substrules
for sr in substrules:
try:
kernel = lp.precompute(kernel, sr.name)
except:
tmpname = "precompute_{}".format(sr.name)
kernel = lp.precompute(kernel,
sr.name,
temporary_name=tmpname,
)
# Vectorization strategies are actually very likely to eliminate the
# precomputation temporary. To avoid the temporary elimination warning
# we need to explicitly disable it.
kernel = kernel.copy(silenced_warnings=kernel.silenced_warnings + ["temp_to_write({})".format(tmpname)])
except RunTimeError:
pass
from loopy import make_reduction_inames_unique
......
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