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

Fix pylint failures for pylint 2.14

parent 1251f96e
No related branches found
No related tags found
No related merge requests found
Pipeline #309732 failed
......@@ -13,4 +13,8 @@
- maptlotlib.pyplot
- arg: init-hook
val: sys.setrecursionlimit(5000)
val: import sys; sys.setrecursionlimit(5000)
- arg: disable
val:
- E1102
......@@ -307,6 +307,7 @@ def _default_check_result(result, ref_result):
linf_err = (
np.max(np.abs(ref_result-result))
/ np.max(np.abs(ref_result-result)))
# pylint: disable=bad-string-format-type
return (False,
"results do not match -- (rel) l_2 err: %g, l_inf err: %g"
% (l2_err, linf_err))
......
......@@ -763,13 +763,14 @@ def get_auto_axis_iname_ranking_by_stride(kernel, insn):
continue
coeffs = CoefficientCollector()(iexpr_i)
for var, coeff in coeffs.items():
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:
iname_to_stride_expr[var.name] = new_stride
# This is a nested if instead of 'and' for pylint's benefit.
if isinstance(var, Variable):
if 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:
iname_to_stride_expr[var.name] = new_stride
# }}}
......@@ -1807,10 +1808,7 @@ def get_subkernel_to_insn_id_map(kernel):
for insn_id in sched_item_to_insn_id(sched_item):
result[subkernel].add(insn_id)
for subkernel in result:
result[subkernel] = frozenset(result[subkernel])
return result
return {name: frozenset(insn_ids) for name, insn_ids in result.items()}
# }}}
......
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