MCPcopy Create free account
hub / github.com/pytorch/executorch / QuantizationParams

Class QuantizationParams

backends/arm/test/runner_utils.py:79–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79class QuantizationParams:
80 __slots__ = ["node_name", "zp", "scale", "qmin", "qmax", "dtype"]
81
82 # todo: zps and scales can be per tensors or per channel => a list??
83 def __init__(
84 self,
85 node_name: str,
86 zp: int,
87 scale: float,
88 qmin: int,
89 qmax: int,
90 dtype: torch.dtype,
91 ):
92 self.node_name = node_name # not need I think, but good for error check
93 self.zp = zp
94 self.scale = scale
95 self.qmin = qmin
96 self.qmax = qmax
97 self.dtype = dtype
98
99
100def get_input_names(program: ExportedProgram) -> list[str]:

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected