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 6b0b975 commit cb12fe0Copy full SHA for cb12fe0
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