MCPcopy
hub / github.com/OpenPPL/ppq / copy

Method copy

ppq/core/quant.py:1003–1013  ·  view source on GitHub ↗

Create an operation config from this one, keep policy and state unchanged. if this one has an non-empty scale or offset, they will be cloned too.

(self)

Source from the content-addressed store, hash-verified

1001 return (self.input_quantization_config + self.output_quantization_config).__iter__()
1002
1003 def copy(self):
1004 """Create an operation config from this one, keep policy and state
1005 unchanged.
1006
1007 if this one has an non-empty scale or offset, they will be cloned too.
1008 """
1009 return OperationQuantizationConfig(
1010 input_quantization_configs=[_.copy() for _ in self.input_quantization_config],
1011 output_quantization_configs=[_.copy() for _ in self.output_quantization_config],
1012 is_positive_quant_op=self.is_active_quant_op
1013 )

Callers

nothing calls this directly

Calls 2

copyMethod · 0.45

Tested by

no test coverage detected