(self, *args, **kwargs)
| 108 | return out |
| 109 | |
| 110 | def to(self, *args, **kwargs): |
| 111 | # These start as None and are only allocated by quantize(). Moving the |
| 112 | # parameter to a device calls this before that allocation. |
| 113 | if isinstance(self.input_q, torch.Tensor): |
| 114 | self.input_q = self.input_q.to(*args, **kwargs) |
| 115 | if isinstance(self.scale, torch.Tensor): |
| 116 | self.scale = self.scale.to(*args, **kwargs) |
| 117 | |
| 118 | def get_scales(self): |
| 119 | return fp_quant_module.get_scales(self.scale, self.num_groups) |
no outgoing calls