(input: Tensor, weight: nn.Parameter, *args, **kwargs)
| 244 | |
| 245 | @functools.wraps(f) |
| 246 | def wrapper(input: Tensor, weight: nn.Parameter, *args, **kwargs) -> Tensor: |
| 247 | if hasattr(weight, 'weight_quantized') and getattr(weight, 'weight_quantized'): |
| 248 | quantized_weight, quant_scale, quant_min = weight.deconcat(weight) |
| 249 | temp_dequantized_weight = weight.dequantizer.dequantize(quantized_weight.view(torch.uint8), quant_scale, |
| 250 | quant_min) |
| 251 | return f(input, temp_dequantized_weight, *args, **kwargs) |
| 252 | else: |
| 253 | return f(input, weight, *args, **kwargs) |
| 254 | |
| 255 | return wrapper |
| 256 |
nothing calls this directly
no test coverage detected