MCPcopy Create free account
hub / github.com/OpenPPL/ppq / __call__

Method __call__

ppq/quantization/algorithm/exprimental.py:52–55  ·  view source on GitHub ↗
(self, tensor: torch.Tensor,
                 config: TensorQuantizationConfig)

Source from the content-addressed store, hash-verified

50 self.config.scale = self.reference
51
52 def __call__(self, tensor: torch.Tensor,
53 config: TensorQuantizationConfig) -> torch.Tensor:
54 config.scale = self.reference * self.arms[self.roll()]
55 return PPQLinearQuantFunction(tensor, config)

Callers

nothing calls this directly

Calls 2

rollMethod · 0.95
PPQLinearQuantFunctionFunction · 0.90

Tested by

no test coverage detected