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

Precompute: Only assign automatic axes if automatic axis were created

parent bf3340f7
No related branches found
No related tags found
No related merge requests found
...@@ -839,8 +839,14 @@ def precompute(kernel, subst_use, sweep_inames=[], within=None, ...@@ -839,8 +839,14 @@ def precompute(kernel, subst_use, sweep_inames=[], within=None,
from loopy import tag_inames from loopy import tag_inames
kernel = tag_inames(kernel, new_iname_to_tag) kernel = tag_inames(kernel, new_iname_to_tag)
from loopy.kernel.tools import assign_automatic_axes from loopy.kernel.data import AutoFitLocalIndexTag
kernel = assign_automatic_axes(kernel) has_automatic_axes = any(
isinstance(tag, AutoFitLocalIndexTag)
for tag in new_iname_to_tag.values())
if has_automatic_axes:
from loopy.kernel.tools import assign_automatic_axes
kernel = assign_automatic_axes(kernel)
return kernel return kernel
......
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