Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchao/quantization/pt2e/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def fold_bn_weights_into_conv_node(
# since the node refers to a mutating op. Here we still need to call DCE first
# to get rid of the unused getitem nodes that consume the BN node.
m.graph.eliminate_dead_code()
if len(bn_node.users) == 0:
if not bn_node._erased and len(bn_node.users) == 0:
m.graph.erase_node(bn_node)


Expand Down
Loading