(self, input: torch.Tensor)
| 37 | |
| 38 | |
| 39 | def forward(self, input: torch.Tensor): |
| 40 | if self.use_weight_quant: |
| 41 | weight = self.weight_quantizer(self.weight) |
| 42 | bias = self.bias |
| 43 | else: |
| 44 | weight = self.weight |
| 45 | bias = self.bias |
| 46 | |
| 47 | |
| 48 | out = self.fwd_func(input, weight, bias, **self.fwd_kwargs) |
| 49 | |
| 50 | |
| 51 | return out |
| 52 | |
| 53 | def set_quant_state(self, weight_quant: bool = False): |
| 54 | self.use_weight_quant = weight_quant |
nothing calls this directly
no outgoing calls
no test coverage detected