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

Fix incorrect assertion in stride finding

parent e5205680
No related branches found
No related tags found
No related merge requests found
......@@ -841,8 +841,9 @@ def get_auto_axis_iname_ranking_by_stride(kernel, insn):
continue
coeffs = CoefficientCollector()(iexpr_i)
for var, coeff in six.iteritems(coeffs):
assert isinstance(var, Variable)
if var.name in auto_axis_inames: # excludes '1', i.e. the constant
if (isinstance(var, Variable)
and var.name in auto_axis_inames):
# excludes '1', i.e. the constant
new_stride = coeff*stride
old_stride = iname_to_stride_expr.get(var.name, None)
if old_stride is None or new_stride < old_stride:
......
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