We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0315628 commit 7cb920bCopy full SHA for 7cb920b
torchao/quantization/pt2e/utils.py
@@ -758,7 +758,7 @@ def fold_bn_weights_into_conv_node(
758
# since the node refers to a mutating op. Here we still need to call DCE first
759
# to get rid of the unused getitem nodes that consume the BN node.
760
m.graph.eliminate_dead_code()
761
- if len(bn_node.users) == 0:
+ if not bn_node._erased and len(bn_node.users) == 0:
762
m.graph.erase_node(bn_node)
763
764
0 commit comments