Skip to content

Commit

Permalink
Fix (equalize): improved cat eq checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Jan 8, 2024
1 parent ade1036 commit e110ad4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/brevitas/graph/equalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,13 @@ def find_sinks(graph_model: GraphModule, starting_node: Node,
channels = []
for n in node.all_input_nodes:
channel_dim = find_srcs_channel_dim(graph_model, n)
if channel_dim is _UNSUPPORTED_OP:
state.sinks[_UNSUPPORTED_OP] = _UNSUPPORTED_OP
continue
channels.append(channel_dim)

# If we found an unsupported op while walking up, we exit this branch and
# invalidate the region
if _UNSUPPORTED_OP in channels:
state.sinks[_UNSUPPORTED_OP] = _UNSUPPORTED_OP
continue
start = sum(channels[:index])
end = start + channels[index]
new_state = WalkRegionState(offset=state.offset)
Expand Down

0 comments on commit e110ad4

Please sign in to comment.