| 77 | |
| 78 | |
| 79 | class 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 | |
| 100 | def get_input_names(program: ExportedProgram) -> list[str]: |
no outgoing calls
no test coverage detected