Skip to content

Commit

Permalink
Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Sep 12, 2023
1 parent 1a106ac commit 23d5743
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/brevitas/graph/equalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ def cat_handler(graph_model: GraphModule, starting_node: Node, state: WalkRegion
state.srcs.clear()
state.sinks.clear()
state.history.clear()
# state.srcs.add((starting_node.target, ()))
state.srcs[starting_node.target] = _UNSUPPORTED_OP
state.update_offset = True
state.offset = 0
Expand Down Expand Up @@ -837,7 +836,8 @@ def _extract_regions(
module = get_module(graph_model, node.target)
weight = get_weight_source([module])
eq_indexes = EqualizationIndexes(0, weight[0].shape[0], 0)
state.srcs[node.target] = eq_indexes
full_source_name = node.target + '$' + str(eq_indexes)
state.srcs[full_source_name] = eq_indexes
find_sinks(graph_model, node, state)
if state.sinks and _UNSUPPORTED_OP not in state.sinks.keys(
) and _UNSUPPORTED_OP not in state.srcs.keys():
Expand All @@ -851,10 +851,8 @@ def _extract_regions(
else:
region = Region(srcs=sorted_srcs, sinks=sorted_sinks)

# new_region = (sorted_tuple_srcs, sorted_tuple_sinks)
if region not in regions:
regions.append(region)
# regions_name.add(region_names)
return regions


Expand Down
1 change: 0 additions & 1 deletion src/brevitas/graph/test_unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def main(args):

# Perform equalization
model, regions = EqualizeGraph(iterations=20, return_regions=True).apply(model)
print(len(regions))
# New output after equalization
out = model(x)
# for region in regions:
Expand Down

0 comments on commit 23d5743

Please sign in to comment.