mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[quant][graphmode][refactor] Remove reduandent code (#54073)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54073 Test Plan: Imported from OSS Reviewed By: vkuzo Differential Revision: D27086067 fbshipit-source-id: b1995138de56f1352c5df03378ebc2832bf35ef7
This commit is contained in:
parent
55544cb13a
commit
c2adedf6fe
|
|
@ -585,10 +585,8 @@ class Quantizer:
|
|||
|
||||
root_node, matched_nodes, pattern, obj, qconfig = matches.get(
|
||||
node.name, (None, None, None, None, None))
|
||||
if root_node is None:
|
||||
env[node.name] = observed_graph.node_copy(node, load_arg)
|
||||
elif root_node is node:
|
||||
env[node.name] = observed_graph.node_copy(node, load_arg)
|
||||
env[node.name] = observed_graph.node_copy(node, load_arg)
|
||||
if root_node is node:
|
||||
# index for input of custom module that needs to be observed in
|
||||
# parent
|
||||
if qconfig is not None:
|
||||
|
|
@ -604,8 +602,6 @@ class Quantizer:
|
|||
env,
|
||||
observed_graph, load_arg, observed_node_names_set,
|
||||
matched_nodes, standalone_module_input_idxs, quants)
|
||||
else:
|
||||
env[node.name] = observed_graph.node_copy(node, load_arg)
|
||||
|
||||
if node.op == 'placeholder':
|
||||
# skip adding observers at the graph input if the input is
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user