mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-05 16:44:58 +08:00
Revert D25684692: [quant][graphmode][fx] Standalone module support {input/output}_quantized_idxs
Test Plan: revert-hammer
Differential Revision:
D25684692 (89b4899ea5)
Original commit changeset: 900360e01c0e
fbshipit-source-id: 8b65fa8fbc7b364fbddb5f23cc696cd9b7db98cd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ec6de6a697
commit
46cf6d332f
@ -753,10 +753,10 @@ class StandaloneModuleQuantizeHandler(QuantizeHandler):
|
||||
qconfig = quantizer.qconfig_map[node.name]
|
||||
convert = torch.quantization.quantize_fx._convert_standalone_module_fx # type: ignore
|
||||
observed_standalone_module = quantizer.modules[node.target]
|
||||
input_quantized_idxs = observed_standalone_module._standalone_module_input_quantized_idxs
|
||||
quantized_standalone_module = convert(observed_standalone_module, debug=debug)
|
||||
parent_name, name = _parent_name(node.target)
|
||||
# update the modules dict
|
||||
setattr(quantizer.modules[parent_name], name, quantized_standalone_module)
|
||||
quantizer.modules[node.target] = quantized_standalone_module
|
||||
return quantizer.quantized_graph.node_copy(node, load_arg(quantized=input_quantized_idxs))
|
||||
# standalone module takes float input
|
||||
return quantizer.quantized_graph.node_copy(node, load_arg(quantized=False))
|
||||
|
||||
Reference in New Issue
Block a user