Skip to content

Commit

Permalink
[bugfix]: fixes typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed May 11, 2021
1 parent 7db8f2e commit 1e29450
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions loopy/schedule/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,18 +375,20 @@ def get_loop_nest_tree(kernel):
continue

for inner_iname in dom.get_var_names(dim_type.set):
if inner_iname not in loop_inames:
continue

# either outer_iname and inner_iname should belong to the same
# loop nest level or outer should be strictly outside inner
# iname

inner_iname_nest = iname_to_tree_node_id[inner_iname]
outer_iname_nest = iname_to_tree_node_id[outer_iname]

if inner_iname_nest == outer_iname_nest:
strict_loop_priorities |= {(outer_iname, inner_iname)}
else:
ancestors_of_inner_iname = {
tree.ancestor(inner_iname_nest, k)
tree.ancestor(inner_iname_nest, k).identifier
for k in range(tree.depth(inner_iname_nest))}
if outer_iname_nest not in ancestors_of_inner_iname:
raise LoopyError(f"Loop '{outer_iname}' cannot be nested"
Expand Down

0 comments on commit 1e29450

Please sign in to comment.